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

HFE page 567-5

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why?
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If methodA has a transaction attribute of RequiresNew, Never, or NotSupported, then it will not use an existing transaction of the calling methodB. MethodB only cares about a TransactionRolledbackException if its transaction is rolled back. In the above cases, methodB will not care about the status of methodA's transaction (if it is running in one).
If methodA has a transaction attribute of Madatory, then it must run in methodB's existing transaction. If methodA throws a system exception, the container will automatically roll back the transaction started by methodB. MethodB definitely cares about this and so it will receive a TransactionRolledbackException.
 
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic