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 » Failover Logic to secondary QM in JAVA

Post new topic  Reply to topic
 Failover Logic to secondary QM in JAVA « View previous topic :: View next topic » 
Author Message
PeterPotkay
PostPosted: Wed Oct 23, 2002 9:30 am    Post subject: Failover Logic to secondary QM in JAVA Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

I am trying to code some logic that will automatically attempt to connect to a secondary server/queue manager should the first become unavailable. The question is, what error codes should this method check for that would indicate a queue manager being unavailable?

So far, I think
2009 (MQRC_CONNECTION_ERROR),
2059 (MQRC_Q_MGR_NOT_AVAILABLE),
2161 (MQRC_Q_MGR_QUIESCING),
2162 (MQRC_Q_MGR_STOPPING)

will cover it. Am I missing any that should be added to this method?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
educos
PostPosted: Tue Nov 19, 2002 8:00 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2001
Posts: 34
Location: Salt Lake City, UT

I built a similar component that retries its connection to a queue manager (rather than go look for another one). When you run your code local to the queue manager, the reason codes you have documented in your email are sufficient. However, when you access the queue manager using host/port/channel, you also get MQRC_UNEXPECTED_ERROR. The list I handle below allows me to recover in every case, regardless of how brutally I break the connection and regardless of whether my code run locally or remotely from the queue manager.

MQException.MQRC_CONNECTION_BROKEN,
MQException.MQRC_HCONN_ERROR,
MQException.MQRC_Q_MGR_NOT_AVAILABLE,
MQException.MQRC_Q_MGR_QUIESCING,
MQException.MQRC_Q_MGR_STOPPING,
MQException.MQRC_UNEXPECTED_ERROR,
MQException.MQRC_OPEN_FAILED,
MQException.MQRC_MAX_CONNS_LIMIT_REACHED

Regards,
Back to top
View user's profile Send private message Visit poster's website
educos
PostPosted: Wed Nov 20, 2002 7:03 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2001
Posts: 34
Location: Salt Lake City, UT

You may, however, run into another issue after you reestablish a connection. See the "Ghost queue monitoring threads" topic in this forum...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Failover Logic to secondary QM in JAVA
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.