Posted: Fri May 09, 2008 6:11 am Post subject: WMQ JMSRA Failover Solved! - MAYBE
Novice
Joined: 07 Sep 2007 Posts: 10
I've been working on setting up a 2 node MQ cluster for the purposes of handing failover if one node goes down, either planned or unplanned. I am using the WMQ JMSRA on JBoss 4.0.5.
I got the CCDT all figured out and configured in my wsmq-ds.xml file however everything I could find on handling failover indicated that it would need to be coded for on the client side.
Well I figured that instead of having to change the code in all of our deployed applications that there had to be another way. So after much fiddling I discovered that if I extend the
Code:
ManagedQueueConnectionFactoryImpl
class and override the
Code:
matchManagedConnections
method that I can test to see if the connection is still valid. If it isn't I can just return a null and the resource adapter will create a new connection. Here is my method code:
I created a single class, exported it into a .jar, stuck it in the wmq.jmsra.rar archive and deployed it to my JBoss instance and so far it seems to be working.
DISCLAIMER - This solution has not been at all thoroughly tested. Use at your own risk!
If anyone has a better solution, or suggestions on how to improve this one then please let me know.
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