Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding the Transaction suppourt when using MDB and SessionBeans  RSS feed

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a MessageDrivenBean calling a sessionBean . What is the best place to handle transactions ? Is it in MDB or SessionBean?

Please Help.
 
Raf Szczypiorski
Ranch Hand
Posts: 383
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends wht you want to achieve, and which type of transaction management you want to use - bean or container?
For exanple, if you want the message receipt be part of the same transaction as operations in the stateless bean, you use CMT on the message bean, and make the transaction context propagate to the bean. This way when the stateless bean rolls back the transaction, the receipt of the message is also rolled back, and the message will get redelivered. This is only one possible option, though, and you may want different behaviour. Describe it, then.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your Great Explanation .

Could you also please tell me what will be the best approach??(I am using CMT only)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!