File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFE page 567-5

 
bird cao
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why?
 
Anthony Watson
Ranch Hand
Posts: 327
  • 0
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic