• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification from j2eecertificate-exception

 
Stephen Selvaraj
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • 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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic