axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marrows, George A \(GE Infra, Energy\)" <george.marr...@ge.com>
Subject [Axis2] Deploy JMS enabled services in app server
Date Wed, 30 Jan 2008 15:41:44 GMT
Hi --
 
Does it make sense to deploy JMS enabled services inside the axis2.war
in an app server? If not, how are people deploying JMS-enabled services?


I ask because I get the following error when running the Axis2 1.3 war
inside JBoss 4.0.5:
 
14:30:46,083 INFO  [JMSConnectionFactory] Mapping JNDI name :
queue/testQueue and JMS Destination name : testQueue against service :
StockQuoteService
14:30:46,083 INFO  [JMSListener] JMS Transport Receiver (Listener)
initialized...
14:30:46,505 ERROR [JMSListener] Error starting connection factory :
myTopicConnectionFactory
javax.jms.IllegalStateException: This method is not applicable inside
the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6 at
org.jboss.resource.adapter.jms.JmsSession.checkStrict(JmsSession.java:54
2)
at
org.jboss.resource.adapter.jms.JmsMessageConsumer.setMessageListener(Jms
MessageConsumer.java:136)
at
org.apache.axis2.transport.jms.JMSConnectionFactory.listenOnDestination(
JMSConnectionFactory.java:450)
at
org.apache.axis2.transport.jms.JMSConnectionFactory.listen(JMSConnection
Factory.java:413)
at
org.apache.axis2.transport.jms.JMSListener.start(JMSListener.java:307)
at
org.apache.axis2.engine.ListenerManager.start(ListenerManager.java:125)
at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:431)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1105)
....

(BTW see https://issues.apache.org/jira/browse/AXIS2-3485 for a problem
that needs to be worked round before you can get to this stage.)

Sure enough, section 6.6 of the spec says "The following methods may
only be used by application components executing in the application
client container:" and includes setMessageListener in the list of
methods. It seems this is because of the clash of threading models in
J2EE and JMS, hence the preferred method of receiving JMS messages is
via a MessageDrivenBean. So perhaps the approach outlined in
https://issues.apache.org/jira/browse/AXIS2-1069 (thanks Ali!) is more
appropriate. Is anyone using that?

Incidentally, the problem can be worked round for JBoss by adding 
    <config-property name="Strict"
type="java.lang.Boolean">false</config-property>
to server\default\deploy\jms\jms-ds.xml (see
http://forum.java.sun.com/thread.jspa?threadID=741011&tstart=345), but
such switches are unlikely to be available on the other, stricter app
servers that I also need to support (eg WebSphere).

Thanks very much for any help.

-- George

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message