| Author |
Enthuware Explanation Doubt-23
|
Amandeep Singh
Ranch Hand
Joined: Jul 17, 2008
Posts: 832
|
|
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- http://rkydesigns.blogspot.com
|
 |
Chaminda Amarasinghe
Ranch Hand
Joined: May 17, 2006
Posts: 402
|
|
|
Tx will be rolled back if only App exception has been marked for roll back.
|
 |
Amandeep Singh
Ranch Hand
Joined: Jul 17, 2008
Posts: 832
|
|
|
Yes it is true, but they didn't mentioned in their line.
|
 |
 |
|
|
subject: Enthuware Explanation Doubt-23
|
|
|