• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Clarification from j2eecertificate-exception

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ejbcert-- clarification
Answers 2 and 4 are correct. When the container starts a transaction, it is responsible for controlling the transaction when it receives an exception. If the bean method throws an application exception but does not mark the transaction for rollback, **the container will commit the transaction before re-throwing the application exception to the client**. If the bean method marks the transaction for rollback, the container will roll back the transaction before re-throwing the application exception to the client.

------------------------------------------------------------------------
Will the container commit the trsxn before rethrowing the application excetpion?

regards
Stephen
 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is only true for stateless session beans and message driven beans no ?
Since method calls to statefull session beans (and entity beans too if I'm not mistaking) may span multiple method calls. So if one method throws an application exception, the transaction can still be continued ?
 
I'm so happy! And I wish to make this tiny ad happy too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic