You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by callagc4 <ca...@fineos.com> on 2008/02/06 17:00:00 UTC

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-Websphere-tp15306749p15306749.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


RE: setMessageListener not permitted in Websphere

Posted by "Marrows, George A (GE Infra, Energy)" <ge...@ge.com>.
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:cathal.callaghan@fineos.com] 
> 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:cathal.callaghan@fineos.com]
> >> 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: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >> 
> >> 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > 
> > 
> > 
> 
> --
> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

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


Re: setMessageListener not permitted in Websphere

Posted by callagc4 <ca...@fineos.com>.
Hi Asankha,

We definitely would be interested in contributing this code. Currently we
are tying up some loose ends with our solution and once this is completed i
will submit it immediately.

Our solution does not support service deployment/undeployment but this can
be controlled through Websphere by stopping the ListenerPort for a
particular services MDB.

Cathal


asankha wrote:
> 
> Hi Cathal
> 
> Would you be interested in contributing this code? Does your solution 
> support service deployment/undeployment?
> 
> asankha
> 
> 
> asankha
> 
> callagc4 wrote:
>> 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
>>>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/setMessageListener-not-permitted-in-Websphere-tp15306749p16417746.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: setMessageListener not permitted in Websphere

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Cathal

Would you be interested in contributing this code? Does your solution 
support service deployment/undeployment?

asankha


asankha

callagc4 wrote:
> 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
>>  

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


RE: setMessageListener not permitted in Websphere

Posted by callagc4 <ca...@fineos.com>.

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:cathal.callaghan@fineos.com] 
>> 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: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/setMessageListener-not-permitted-in-Websphere-tp15306749p16281501.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


RE: setMessageListener not permitted in Websphere

Posted by "Marrows, George A (GE Infra, Energy)" <ge...@ge.com>.
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:cathal.callaghan@fineos.com] 
> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

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


RE: setMessageListener not permitted in Websphere

Posted by "Marrows, George A (GE Infra, Energy)" <ge...@ge.com>.
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org