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 » JMS to MI Broker, Commit rollback

Post new topic  Reply to topic
 JMS to MI Broker, Commit rollback « View previous topic :: View next topic » 
Author Message
Gideon
PostPosted: Fri Sep 06, 2013 7:12 am    Post subject: JMS to MI Broker, Commit rollback Reply with quote

Chevalier

Joined: 18 Aug 2009
Posts: 403

I have a MI broker (and MI qmgr)

My JMS code is writing messages and committing them (the messages are persistent transacted). The JMS code reconnects using a connection list, and I have tested the reconection successfully several times.

When I fail over using endmqm -is in order to switch to the other broker instance (and of course the other qmgr instance), I get the following error from my java code:

Code:
com.ibm.msg.client.jms.DetailedTransactionRolledBackException: JMSCMQ0002: The m
ethod 'MQCMIT' failed.
A WebSphere MQ call failed.
Please see the linked exception for more information.
Inner exception(s):
com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' (
'MQCC_FAILED') reason '2003' ('MQRC_BACKED_OUT').
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2003


My take is that this is correct behavior, as the code lost connectivity with the qmgr temporarily, and could not commit before it could reconnect.

Is my assumption correct ?
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Sep 06, 2013 8:49 am    Post subject: Reply with quote

Grand High Poobah

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

I would expect so. You can find out more, faster, by testing the behavior around transactions. The application will have to deal with the occasional rollback / error.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Gideon
PostPosted: Fri Sep 06, 2013 10:12 am    Post subject: Reply with quote

Chevalier

Joined: 18 Aug 2009
Posts: 403

Thank you.

Just one thing about your response, you said I could find out more, faster, with the use of transactions. I am using the following code:

session.commit();

in a try statement right before I catch the error I previously mentioned.

So I think I am doing what you are suggesting. Am I missing something, or am I on the right path ?

Thanks again
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Sep 07, 2013 6:12 am    Post subject: Reply with quote

Grand High Poobah

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

Gideon wrote:
Thank you.

Just one thing about your response, you said I could find out more, faster, with the use of transactions. I am using the following code:

session.commit();

in a try statement right before I catch the error I previously mentioned.

So I think I am doing what you are suggesting. Am I missing something, or am I on the right path ?

Thanks again


If you created your session as transacted (as I would expect you did) you're on the right path.

Have fun
_________________
MQ & Broker admin
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 » JMS to MI Broker, Commit rollback
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.