Transaction Handling
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gayathri_Kumar
Posted On:   Saturday, November 3, 2001 10:29 AM

Hi ! I have a stateless session bean calling a BMP entity bean, with the transaction attrubute set to "Required" and the IsolationLevel is "Tx_Repeatable_Read " In my business method of session bean, I perform two operations : 1. Lookup entity bean, find by criteria and call the business method of entity bean, which inturn updates a table. 2. In the same business method, I remove a row from the other table. Tell us a best way of Exception Handling that can be used so that either in case of sucess both gets comitted or or in case of a failure both rollback.Explain how to use EJBContext.setRollbackOnly() effectively in such cases?    More>>

Hi ! I have a stateless session bean calling a BMP entity bean,
with the transaction attrubute set to "Required" and
the IsolationLevel is "Tx_Repeatable_Read "
In my business method of session bean,
I perform two operations :
1. Lookup entity bean, find by criteria and call the
business method of entity bean, which inturn updates a table.
2. In the same business method, I remove a row from the other table.


Tell us a best way of Exception Handling that can be used so that
either in case of sucess both gets comitted or
or in case of a failure both rollback.Explain how to use
EJBContext.setRollbackOnly() effectively in such cases?

   <<Less

Re: Transaction Handling

Posted By:   Bozidar_Dangubic  
Posted On:   Saturday, November 3, 2001 12:56 PM

if any operation fails, call setRollbackOnly() and throw an exception to indicate to the client that the operation was not successful.
About | Sitemap | Contact