• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt about transaction

 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spec 18.3.1, from the table:-

If the bean runs in the context of the caller's tx (required, mandatory and supports), the tx will be rolledback.
If the bean runs in unspecified tx (NotSupported, Never and Supports), the tx is NOT automatically rolledback.

Now, what happens when the bean runs with "supports" attribute (support comes in both the above cases) ... will be tx be rolledback or not ???
 
Marcelo Sousa Ancelmo
Ranch Hand
Posts: 498
Eclipse IDE Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Giju,

It all depend's if the method was called in a transaction context, if the caller of the bean call's a method that was marked as Supports and there is a transaction, then that transaction will be propagated to the next call, like a chain, so in the case of:


in such a case, the Bean C has a transaction Context that comes form Bean A, so, the transaction can be rollback

But if we have:


Then there is no transaction context to Bean C.

Regards,
[ August 12, 2004: Message edited by: Marcelo Sousa Ancelmo ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic