• 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
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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 ?
 
We're being followed by intergalactic spies! Quick! Take this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic