Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt from ejbcerticate mock exam

 
Pooja Gupta
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the answers explanation says " A transaction is not rolled backed by the container as a result of a system exception thrown when the transaction runs with an unspecified transaction context and also when a bean is declared with bean-managed transaction demaraction. "

Now, in HF book (page 534), it's written that container will always roll back the exception once a system exception is thrown. It doesn't say any thing about whether it is BMT/CMT. Which is correct - HF or ejbCertificate exam?

Thanks
Pooja
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be it BMT or CMT, the container always rolls back a started transaction if the bean instance throws a System Exception. The container destroys the instance when a system exception is thrown. There is no point in keeping the transaction open when the instance that started it no longer exists. Makes sense?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic