• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to enable transactions with JMS

 
Rajesh Rajaram
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement based on the delivery of the JMS Message condition,
I have to commit another transaction. How enable transactions with JMS.

Regards

Rajesh
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JMS implies guaranteed messaging ... in case that's what you're trying to handle. But, to answer your question: if you wanted to use transactions within JMS outside of some container (like EJB) that automatically handles managing transactions and binding them in JNDI like usual, you probably need some package/library/whatever to do it all for you.

As you probably know, JMS doesn't explicitly provide transactions ... since it's just a wrapper around messaging platforms. You probably can do whatever you're thinking can only be done with transactions, with normal exception handling though.

Also, in case you're going this way: since JMS decouples senders from receivers, there's not really any way of that I know, to somehow unify the sender's running transaction with the receiving components transaction, such that if the receiving component needs to rollback, the sending component would somehow know to rollback also.

Basically, you need to analyze the actual requirements for your application here. I really have no idea what you're trying to do -- so instead of rambling on here, I'll quit. Good luck though.
 
Dan Johnsson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rajesh:
Hi All,

I have a requirement based on the delivery of the JMS Message condition,
I have to commit another transaction. How enable transactions with JMS.

Regards

Rajesh


[Dan guessing] If the action sending the message cannot commit until the message have been properly handled (by the reciever), you have a (de facto) synchronous transfer. If so, JMS might not be the proper tool.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!