Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

doubt about transaction

 
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 ???
 
Ranch Hand
Posts: 498
Eclipse IDE Firefox Browser Fedora
  • 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 ]
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic