Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt from ejbcerticate mock exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Doubt from ejbcerticate mock exam" Watch "Doubt from ejbcerticate mock exam" New topic

Doubt from ejbcerticate mock exam

Pooja Gupta

Joined: Nov 30, 2002
Posts: 15
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?


Pooja Gupta<br />SCJP, SCWCD(preparing)
Keerthi P
Ranch Hand

Joined: Aug 19, 2003
Posts: 203
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?

Cheers.<br />Keerthi<br />(SCJP, SCWCD, SCBCD)
It is sorta covered in the JavaRanch Style Guide.
subject: Doubt from ejbcerticate mock exam