RE: [Axis2] Error while starting JMS listener with JBoss
Hi Ines -- I think you've got the same class loaded by two different class loaders. At least, I got the same error and the fix was to remove one copy of these classes - see https://issues.apache.org/jira/browse/AXIS2-3485 -- George _ From: Ines Dannehl [mailto:[EMAIL PROTECTED] Sent: 14 April 2008 10:59 To: axis-user@ws.apache.org Subject: [Axis2] Error while starting JMS listener with JBoss Hi, I'm using Axis2 version 1.1.1 with JBoss version 4.0.5.GA. I try to use the webservice via a JMS connection. My problem ist hat there is no JMS listener started on my queue. I found the bug report http://issues.apache.org/jira/browse/AXIS2-1488. I'd like to know if there is a solution in Axis2 version 1.3 (I tested it but without success)? I tried out the patch given in the bug report but while starting the JMS listener I get a ClassCastException: INFO [org.apache.axis2.engine.ListenerManager] org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl The ClassCastException occurs while executing the line conFactory= (ConnectionFactory) context.lookup(jndiName); in the connect() - method of the class JMSConnectionFactory. I cannot understand why I get a ClassCastException because the org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl implements the interface ConnectionFactory. Please help! Ines
RE: setMessageListener not permitted in Websphere
Hi Cathal -- yes, that helps validate what I'm doing, which is along the same lines. Thanks very much for the feedback! After the project rush is over I'll ask management if we can publish what we've done, perhaps for inclusion in a later version of Axis2. In the meantime, I've submitted https://issues.apache.org/jira/browse/AXIS2-3662 -- George > -Original Message- > From: callagc4 [mailto:[EMAIL PROTECTED] > Sent: 25 March 2008 17:53 > To: axis-user@ws.apache.org > Subject: RE: setMessageListener not permitted in Websphere > > > > Hi George, > > Yes we are currently using JMS in WAS 6.1. We chose to go > with the MDB approach. It seems that this is IBM's > recommended approach to take. What this entailed for us was > to basically rewrite the axis2 JMSMessageReceiver class. We > deploy an MDB per service. This MDB then forwards the message > request into our version of the JMSMessagereciever which > looks after passing the message into the AxisEngine. > > Hope this helps, > Cathal > > > Marrows, George A (GE Infra, Energy) wrote: > > > > Hi Cathal -- > > > > I see from your more recent mails that you are up and running with > > Axis2 on JMS. Is that still under WAS 6.1? If so, I'm curious what > > deployment approach you took in the end - was it 1) MDBs or 2) > > changing the Axis2 code to not use setMessageListener or 3) > something else? > > > > > > Hi Axis2 team -- > > > > Given Cathal's problem below (which I see also), what is > the correct > > way to deploy Axis2 with JMS transport in in an app server that > > complies with the J2EE 1.4 spec? > > https://issues.apache.org/jira/browse/AXIS2-1069 > > (Message Driven Bean as JMS listener) was closed recently as won't > > fix, which suggest you don't want to support the MDB > approach. Is that > > correct? > > > > Thanks all! > > > > -- George > > > > > >> -Original Message- > >> From: callagc4 [mailto:[EMAIL PROTECTED] > >> Sent: 06 February 2008 16:00 > >> To: axis-user@ws.apache.org > >> Subject: setMessageListener not permitted in Websphere > >> > >> > >> Hi, > >> > >> We are currently deploying axis2 in Websphere 6.1. We wish > to use the > >> jms transport. However axis2 fails to start because it > uses forbidden > >> api's. > >> > >> On startup axis2's JMSConnectionFactory class calls the > >> listenOnDestination(String destinationJndi) method. Here > it creates a > >> MessageConsumer and calls the > >> MessageConsumer.setMessageListener(MessageListener > listener) method. > >> This causes failure and the exception thrown is as follows: > >> javax.jms.IllegalStateException: Method setMessageListener not > >> permitted > >> > >> On looking through docs online it is clear that IBM have > stuck to the > >> J2EE > >> 1.4 specification. This states that the > >> MessageConsumer.setMessageListener(MessageListener > listener) method > >> can not be called in a Web or EJB container. See > >> http://www.ibm.com/developerworks/library/j-getmess/ for details. > >> > >> My question is that why is axis2 not compliant with this > >> specification? Also what options do i have for using the jms > >> transport with axis2 in WAS. > >> > >> Initial research shows the following possibilities: > >> 1) Use MDB's (not ideal) > >> 2) Change the axis2 code itself and make a synchronous > >> MessageConsumer.receive call and poll for messages > >> > >> Can anyone advice on the best approach here? And also will > >> axis2 become compliant with the J2EE 1.4 spec in the future? > >> > >> Thanks, > >> Cathal > >> -- > >> View this message in context: > >> http://www.nabble.com/setMessageListener-not-permitted-in-Webs > >> phere-tp15306749p15306749.html > >> Sent from the Axis - User mailing list archive at Nabble.com. > >> > >> > >> > - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/setMessageListener-not-permitted-in-Webs > phere-tp15306749p16281501.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setMessageListener not permitted in Websphere
Hi Cathal -- I see from your more recent mails that you are up and running with Axis2 on JMS. Is that still under WAS 6.1? If so, I'm curious what deployment approach you took in the end - was it 1) MDBs or 2) changing the Axis2 code to not use setMessageListener or 3) something else? Hi Axis2 team -- Given Cathal's problem below (which I see also), what is the correct way to deploy Axis2 with JMS transport in in an app server that complies with the J2EE 1.4 spec? https://issues.apache.org/jira/browse/AXIS2-1069 (Message Driven Bean as JMS listener) was closed recently as won't fix, which suggest you don't want to support the MDB approach. Is that correct? Thanks all! -- George > -Original Message- > From: callagc4 [mailto:[EMAIL PROTECTED] > Sent: 06 February 2008 16:00 > To: axis-user@ws.apache.org > Subject: setMessageListener not permitted in Websphere > > > Hi, > > We are currently deploying axis2 in Websphere 6.1. We wish to > use the jms transport. However axis2 fails to start because > it uses forbidden api's. > > On startup axis2's JMSConnectionFactory class calls the > listenOnDestination(String destinationJndi) method. Here it > creates a MessageConsumer and calls the > MessageConsumer.setMessageListener(MessageListener listener) > method. This causes failure and the exception thrown is as follows: > javax.jms.IllegalStateException: Method setMessageListener > not permitted > > On looking through docs online it is clear that IBM have > stuck to the J2EE > 1.4 specification. This states that the > MessageConsumer.setMessageListener(MessageListener listener) > method can not be called in a Web or EJB container. See > http://www.ibm.com/developerworks/library/j-getmess/ for details. > > My question is that why is axis2 not compliant with this > specification? Also what options do i have for using the jms > transport with axis2 in WAS. > > Initial research shows the following possibilities: > 1) Use MDB's (not ideal) > 2) Change the axis2 code itself and make a synchronous > MessageConsumer.receive call and poll for messages > > Can anyone advice on the best approach here? And also will > axis2 become compliant with the J2EE 1.4 spec in the future? > > Thanks, > Cathal > -- > View this message in context: > http://www.nabble.com/setMessageListener-not-permitted-in-Webs > phere-tp15306749p15306749.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setMessageListener not permitted in Websphere
Cathal said: > We are currently deploying axis2 in Websphere 6.1. We wish to use the jms > transport. However axis2 fails to start because it uses forbidden api's. I don't have an answer, but I am very interested in hearing about how best to do this - I posted a similar query on 30 Jan. > Initial research shows the following possibilities: > 1) Use MDB's (not ideal) > 2) Change the axis2 code itself and make a synchronous MessageConsumer.receive call and poll for messages A third option: 3) Run axis2server.bat as a separate process outside of the app server. We're going to explore the performance/scalability implications of this option, but it certainly doesn't seem the most elegant of solutions. -- George - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] Deploy JMS enabled services in app server
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 false 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]