• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

doubt about transaction

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ???
 
Ranch Hand
Posts: 498
Eclipse IDE Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic