• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Websphere MQ failover

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I am developing an MQ client using the Ibm.mq.jar provided with the MQ. to connect to MQ manager and to put and get from the queues. The issue is that my app that is going to use it is in cluster mode. (not talking about the MQ cluster here). I need to know if IBM websphere6.1 has any functionality to actually bind my component some how to the extent that when It puts and the node in cluster goes down the next node takes the operation and reads from the node and delivers it back to the user.


I will appreciate any help or tips on countering this scenario.

Thanks.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you specified that WMQ clustering is not used then there is only one instance of the queue. When multiple application instances are reading off the same queue, they are all competing for the same messages. If one application fails, the other instances will continue to consume off the queue and receive messages that the first instance would have received. If one application puts a message, commits it and then attempts to read it back, it is entirely possible that another application will already have read it before the first can get it, if they are reading in FIFO order. Of course, if they are reading by MsgID or CorrelID then the other app instance would somehow have to be passed the ID in order to select that specific message.
 
Syed Mahdi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not talking about issues with MQ clustering (even though we do have MQ clustered). I am talking about cluster of web sphere and my web app accessing MQ through my adapter. if there are two nodes in a cluster and both have my MQ adapter to access the MQ and one goes down half way thru the communication how can i transfer that state to the other node telling it to complete the half done communication. Does websphere has any feature to register what is happening on the MQ level.
 
T.Rob Wyatt
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Syed Mahdi wrote:...if there are two nodes in a cluster and both have my MQ adapter to access the MQ and one goes down half way thru the communication how can i transfer that state to the other node telling it to complete the half done communication. Does websphere has any feature to register what is happening on the MQ level.



Transactional sessions. When the first node goes down the transaction will roll back so that instead of a "half done communication" that unit of work reverts back to an "unstarted communication."
 
Syed Mahdi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok.. thats an idea, how do i bind the communication in a transaction or transactional sessions. a reversal is better than a half done communication.
 
T.Rob Wyatt
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be able to specify a transacted session and get 1-phase commit. Just use the COMMIT verb after each set of messages. Since you aren't using transactions now I'll assume that you don't need 2-phase commit but if you did you'd need to use an XAConnectionFactory instead of a ConnectionFactory. If you needed 2-phase commits the app server configuration would impact your app. With 1-phase commit there are some app server settings that would provide transaction management in the container but in this case it's probably easiest to just specify a transacted session and issue COMMITs. Just remember that the scope of the transaction is the session. So if you have multiple threads, each must have its own session or else they will COMMIT against each other's work which is probably not what you want.
 
Liar, liar, pants on fire! refreshing plug:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic