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 » Auto reconnect after an MQ failure

Post new topic  Reply to topic
 Auto reconnect after an MQ failure « View previous topic :: View next topic » 
Author Message
franklinc
PostPosted: Wed Aug 04, 2010 3:58 am    Post subject: Auto reconnect after an MQ failure Reply with quote

Newbie

Joined: 04 Aug 2010
Posts: 4

Hello all,

I'm experiencing an issue when MQ goes down for some reason I have to restart my servers in order for my MDBs/MDPs to reconnect to the queues. I have been searching for a way to automatically have them reconnect after and MQ failure/restart.

My setup is as follows:
- MDB/P listeners connected via Spring JMS containers
- JBoss 4.0.5 (will be moving to 5.0.0 within the next month)
- WMQ 6

Any help with this matter will be greatly appreciated!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 04, 2010 4:09 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

franklinc wrote:
Any help with this matter will be greatly appreciated!


Upgrade to WMQv7 & use the new client auto-reconnect feature.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
franklinc
PostPosted: Wed Aug 04, 2010 4:16 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Newbie

Joined: 04 Aug 2010
Posts: 4

Vitor wrote:
franklinc wrote:
Any help with this matter will be greatly appreciated!


Upgrade to WMQv7 & use the new client auto-reconnect feature.


On IBM's support site for WMQv7 it says:

Quote:
Automatic client reconnect is not supported by WebSphere® MQ classes for Java.

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.csqzaf.doc/cs70190_.htm

Does this mean that it can't be used with MDBs? This line had me a little concerned.

Thanks for the speedy reply![/url]
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 04, 2010 4:38 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

franklinc wrote:
On IBM's support site for WMQv7 it says:

Quote:
Automatic client reconnect is not supported by WebSphere® MQ classes for Java.

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.csqzaf.doc/cs70190_.htm

Does this mean that it can't be used with MDBs? This line had me a little concerned.


Does it? This is what I get for answering questions about Java. I should know better after all this time.....

Someone who knows what they're talking about will be along in a minute.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 04, 2010 12:42 pm    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Grand High Poobah

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

franklinc wrote:
Hello all,

I'm experiencing an issue when MQ goes down for some reason I have to restart my servers in order for my MDBs/MDPs to reconnect to the queues. I have been searching for a way to automatically have them reconnect after and MQ failure/restart.

My setup is as follows:
- MDB/P listeners connected via Spring JMS containers
- JBoss 4.0.5 (will be moving to 5.0.0 within the next month)
- WMQ 6

Any help with this matter will be greatly appreciated!

I would expect you'd have to setup something line a connection listener attached to your MDB. So when the MDB goes down you should get an alert from the connection listener. Now you need to figure out how to programatically restart the MDB

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Wed Aug 04, 2010 1:41 pm    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

franklinc wrote:
Does this mean that it can't be used with MDBs? This line had me a little concerned.

Like Vitor, my Java knowledge is not one of my strong points.

But I typed "jms reconnect" into the search box of the MQ information center and this was the first link: http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaw.doc/jm25035_.htm
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 04, 2010 8:37 pm    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Grand High Poobah

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

mvic wrote:
franklinc wrote:
Does this mean that it can't be used with MDBs? This line had me a little concerned.

Like Vitor, my Java knowledge is not one of my strong points.

But I typed "jms reconnect" into the search box of the MQ information center and this was the first link: http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzaw.doc/jm25035_.htm


I take this to mean you can't use it from java base.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
franklinc
PostPosted: Thu Aug 05, 2010 3:39 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Newbie

Joined: 04 Aug 2010
Posts: 4

Quote:

I would expect you'd have to setup something line a connection listener attached to your MDB. So when the MDB goes down you should get an alert from the connection listener. Now you need to figure out how to programatically restart the MDB

Have fun


Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect?
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Aug 05, 2010 4:20 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

franklinc wrote:
Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect?

If there is, it will should in the manuals in the MQ Information Center. Did you search the Information Center? Did you look at the URL I posted?
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Aug 05, 2010 5:03 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Quote:
Use the CONNECTIONNAMELIST and CLIENTRECONNECTOPTIONS properties of the MQClientConnectionFactory class to configure a client connection to automatically reconnect following a connection failure or an administrative request to reconnect client applications after stopping a queue manager.


I am told you can use a "maplist" to set such values in Spring. This is the sum total of my knowledge on this.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 05, 2010 5:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

In addition, there are conditions on a Listener where the listener will shut itself down based on the backout settings. This is entirely JMS and not MQ.

I've forgotten what they are, but I suspect fjb_saper will remember.
Back to top
View user's profile Send private message
franklinc
PostPosted: Thu Aug 05, 2010 7:20 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Newbie

Joined: 04 Aug 2010
Posts: 4

mvic wrote:
franklinc wrote:
Well I do have a Spring JMS container which sits in front of my MDB. The Spring JMS container listens to the queue and when a message arrives it calls the onMessage() method of the MDB. Is there a setting here I can change for auto reconnect?

If there is, it will should in the manuals in the MQ Information Center. Did you search the Information Center? Did you look at the URL I posted?


Yes, I have been to that site before. What concerned me was the note about Auto reconnect not being supported by MQ classes for Java.

I'm wondering though if the MDB sits behind a JMS container would that constraint still apply?

BTW, thanks to everyone for all the help! I really appreciate it
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Aug 05, 2010 7:39 am    Post subject: Re: Auto reconnect after an MQ failure Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

franklinc wrote:
Yes, I have been to that site before. What concerned me was the note about Auto reconnect not being supported by MQ classes for Java.

Understood.

Perhaps there is a difference between "MQ Classes for Java" and "MQ Classes for JMS".

The URL I posted seems to suggest that. Perhaps IBM support can tell you for sure.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 05, 2010 11:04 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
In addition, there are conditions on a Listener where the listener will shut itself down based on the backout settings. This is entirely JMS and not MQ.

I've forgotten what they are, but I suspect fjb_saper will remember.

They have to do with the MDB's reprocess and the BOTHRESH.
You have to keep the MDB's reprocess > than the BOTHRESH otherwise the MDB can no longer handle the poison message and will shut down.
_________________
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 » Auto reconnect after an MQ failure
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.