The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Enthuware Explanation Doubt-23 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Enthuware Explanation Doubt-23" Watch "Enthuware Explanation Doubt-23" New topic

Enthuware Explanation Doubt-23

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
As per section 5.4.17 of EJB 3.0 Core specification, a message-driven bean’s message listener method must not throw the java.rmi.RemoteException. It can throw any other exception. If it throws an application exception, the transaction (if any) is rolled back, the exception is rethrown to the resource adapter, and the bean is NOT discarded. If it throws a system exception, the exception is logged, the transaction (if any) is rolledback, and the bean is discarded.

The bold line says, for application exception thrown, if there is transaction it will be rolled back. I don't find any such line in the specifications.

The spec.'s simply says-

The message listener methods of some messaging types may throw application exceptions. An application
exception is propagated by the container to the resource adapter.

Did they added this line on their own even mentioning it is from specif. or they the spec. got updated?
the transaction (if any) is rolled back,

SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog-
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 404
Tx will be rolled back if only App exception has been marked for roll back.
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
Yes it is true, but they didn't mentioned in their line.
wood burning stoves
subject: Enthuware Explanation Doubt-23
It's not a secret anymore!