wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Trsxn commit/rollback query. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Trsxn commit/rollback query." Watch "Trsxn commit/rollback query." New topic
Author

Trsxn commit/rollback query.

Stephen Selvaraj
Greenhorn

Joined: Jan 21, 2005
Posts: 21
Hi All,

I 'm bit confused....
If a bean throws a Application Exception will the Transaction be committed before throwing the Application Exception to the client.

Any comments...
- Stephen
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Let's say that this is a CMT bean. Transactions are scoped at method level for all CMT beans. When an application exception is thrown, the container is required by the EJB spec not to rollback the transaction. There are two ways to end a transaction: commit or rollback. So, the container must commit the transaction at the end of the method.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trsxn commit/rollback query.
 
Similar Threads
EJB3: Exception handling in client code
Checked application exception
Ask Exception?????Urgent
Using EJB via RMI
Txn not automatically rolling back after RemoteException