ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MDB rollback, Listener port is stopped as a result

Post new topic  Reply to topic
 MDB rollback, Listener port is stopped as a result « View previous topic :: View next topic » 
Author Message
anilnadgeri
PostPosted: Fri Dec 02, 2005 7:33 pm    Post subject: MDB rollback, Listener port is stopped as a result Reply with quote

Newbie

Joined: 02 Dec 2005
Posts: 2

Hi
We have a MDB listening on QUEUE1. This MDB processes the message and puts another message in QUEUE2. Transaction is "required" for this MDB.
The processing could somtime take more than 2 min. We used to get EJB timeout error in this scenario. We changed EJB timeout to 5 min (default was 2 min). This resolved the timeout error. But it started throwing following exception. Note that if the processing takes less than 2 min, MDB never rollbacks.
After this rollack, listener port can not pick up the next message and it throws error (MQJMS2002: failed to get message from MQ queue. MQ Error Code 2072) . It stops as a result and restarts after 60 sec. Even after restart it can not process the messages till we restart the JVM.

We are using 2 Phase commit for 2 resources MQ (5.3) and MS SQL.
Websphere version is 5.1.

Any pointers to resolve this issue?
----------------------------------------------------------------------------
EXCEPTION

[11/29/05 15:03:37:752 EST] 1b9bccc XATransaction E J2CA0027E: An exception occurred while invoking end on an XA Resource Adapter from dataSource JMS$postprocessor$JMSManagedConnection@25078403, within transaction ID {XID: formatId(57415344), gtrid_length(51), bqual_length(2, data(00000000000000950000000113238145f813eccfef12249c6aab206666f96901636c5f6170703130355f73656e7431715f716113238145f813eccfef12249c6aab206666f969010000000100000000)}: javax.transaction.xa.XAException: XA operation failed, see errorCode

at com.ibm.mq.MQXAResource.end(MQXAResource.java:520)
at com.ibm.ejs.jms.JMSManagedSession$JMSXAResource.end(JMSManagedSession.java:1557)
at com.ibm.ejs.j2c.XATransactionWrapper.end(XATransactionWrapper.java:525)
at com.ibm.ws.Transaction.JTA.JTAResourceBase.end(JTAResourceBase.java:253)
at com.ibm.ws.Transaction.JTA.RegisteredResources.distributeEnd(RegisteredResources.java:629)
at com.ibm.ws.Transaction.JTA.TransactionImpl.internalPrepare(TransactionImpl.java:1241)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:981)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:150)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:177)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:712)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:570)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3068)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
.
[11/29/05 15:03:38:089 EST] 1b9bccc ServerSession W WMSG0031E: Exception processing JMS Message for MDB BatchProcessorMDB, JMSDestination jms/PostprocessorQ : javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException

com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:159)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)

at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.ws.exception.WsEJBException
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExceptionMappingStrategy.java:96)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExceptionMappingStrategy.java:165)
at com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledBackException(LocalExceptionMappingStrategy.java:293)

at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3159)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[11/29/05 15:03:38:124 EST] 1e9aa18 JMSExceptionL E WMSG0018E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ : javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue

at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:553)
at com.ibm.mq.jms.MQSession.consume(MQSession.java:3144)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072
at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[11/29/05 15:03:38:149 EST] 1e9aa18 JMSExceptionL E WMSG0057E: Error on JMSConnection for MDB BatchProcessorMDB , JMSDestination jms/PostprocessorQ , JMS Linked Exception : com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072

at com.ibm.mq.jms.MQSession.consume(MQSession.java:3118)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1585)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:924)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:527)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:494)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:375)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[11/29/05 15:03:38:190 EST] 1e9aa18 MDBListenerIm I WMSG0043I: MDB Listener ProcessorLP stopped for JMSDestination jms/PostprocessorQ

[11/29/05 15:03:38:192 EST] 1e9aa18 MDBListenerIm I WMSG0058I: Listener Port ProcessorLP will attempt to restart in 60 seconds

[11/29/05 15:03:38:194 EST] 1e9aa18 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource jms/PostprocessorQF. The exception which was received is javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue

[11/29/05 15:04:38:230 EST] 1436f66 MDBListenerIm I WMSG0042I: MDB Listener ProcessorLP started successfully for JMSDestination jms/PostprocessorQ
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 02, 2005 11:25 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

OK,

So now you have this to look up :
Quote:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2072


I do not believe that you have a backout threshold set on your queue or a reprocess # set on your MDB. This is why this poison message is stopping the MDB Listener. So process working as designed.

I would suggest you look up the error handling on the EJB and the error handling of Poison Messages respectively in the Websphere and WebsphereMQ manuals

Enjoy
Back to top
View user's profile Send private message Send e-mail
anilnadgeri
PostPosted: Sat Dec 03, 2005 7:21 am    Post subject: Reply with quote

Newbie

Joined: 02 Dec 2005
Posts: 2

Thanks for the response. Here is further info.

Backout threshold is 3. If the message is redelivered, we discard this message.
In this scenario, once the JVM is recycled, the poison message is redelivered and then discarded by the MDB.

Two issues here
1. Why is MDB rolling back if processing takes more than 2 min.
2. After the rollback, why is listener port not picking up the messages. Why do we need to recycle the JVM.


Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Dec 03, 2005 10:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Make sure the # of reprocesses allowed for the MDB is >= 4.

It looks to me like processing as designed with BO Threshold =3 and reprocess # <= 3.

2)A poison message will try to redeliver up to 3 times to the MDB. On the 3rd time it will go to the BO queue or the DLQ. If your reprocess attribute on the MDB is less than 4 the MDB stops working == as designed.

1) How about timeout of the offending component (DB?) ?

Enjoy
Back to top
View user's profile Send private message Send e-mail
tsrisudh
PostPosted: Thu Dec 08, 2005 5:10 am    Post subject: Reply with quote

Centurion

Joined: 11 Aug 2005
Posts: 113

I too am having the same problem, but where do i specify the reprocess number in MDB, i saw the config but could not find it anywhere

Is it in the Q definition, Q factory definition or listener port definition?
_________________
Srisudhir Tadepalli
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Thu Dec 08, 2005 5:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Check out the MDB setup. That's where you'll find it.
Back to top
View user's profile Send private message Send e-mail
webspherical
PostPosted: Thu Dec 08, 2005 7:13 am    Post subject: Reply with quote

Acolyte

Joined: 15 Aug 2005
Posts: 50

Quote:
Check out the MDB setup. That's where you'll find it.


setup as in..

Admin console, or deployment descriptor or actual code..?

thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 08, 2005 8:58 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Admin Console
Back to top
View user's profile Send private message Send e-mail
amateur10
PostPosted: Sat Dec 10, 2005 8:22 am    Post subject: Reply with quote

Centurion

Joined: 23 Nov 2005
Posts: 102

Hi,

I am new to this forum and new for ICS/MQ series but I hvae to learn. Is this correct forum to discuss about JMS? I have some questionns about JMS?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Dec 10, 2005 11:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

amateur10 wrote:
Hi,
I am new to this forum and new for ICS/MQ series but I have to learn. Is this correct forum to discuss about JMS? I have some questionns about JMS?

Read the manual Using Java and if you still have questions open a new thread and post them here.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MDB rollback, Listener port is stopped as a result
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.