| Author |
CMT and Business method exceptions - question
|
Saeed Amer
Ranch Hand
Joined: Jan 20, 2004
Posts: 135
|
|
Hi everyone, How will the EJB container handle exceptions thrown by a business method of a bean with container managed transaction demarcation? For example, if the instance did not call setRollbackOnly(), would the container COMMIT the transaction or ROLLBACK the transaction and Why? My opinion is that the transaction should be rolledback but I may be wrong. I understand that if the instance called setRollbackOnly(), the container will rollback the transaction. TIA, Saeed
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8143
|
|
If any Runtime exception occurs, then the container will rollback the transaction. See section 8.7.4. Unchecked Exceptions at: [ UD: removed link to copyrighted material ] [ August 03, 2007: Message edited by: Ulf Dittmer ]
|
[My Blog] [JavaRanch Journal]
|
 |
Saeed Amer
Ranch Hand
Joined: Jan 20, 2004
Posts: 135
|
|
Thank you so much Jaikiran! The link you have provided is very useful. Do you have link to the latest version of these books? These books are like 6 to 8 years old. Thanks again! Saeed [ February 21, 2006: Message edited by: Saeed Amer ]
|
 |
 |
|
|
subject: CMT and Business method exceptions - question
|
|
|