hi, I have problems getting container managed transactions working.
i am trying to post 1 transaction. the transaction has two business methods. both methods are ejbCreate method. I want to rollback first method if second method fails. but when I do that, only second method fails. I read from paper that application exceptions like createException, RemoveException don't rollback in container transaction demarcation.
how i can do that both methods rollback.
-
container managed transaction demarcation in EJB (4 messages)
- Posted by: Park In Geun
- Posted on: August 17 2001 09:25 EDT
Threaded Messages (4)
- container managed transaction demarcation in EJB by Mohan Navaratna on August 17 2001 14:45 EDT
- container managed transaction demarcation in EJB by Park In Geun on August 17 2001 20:01 EDT
-
container managed transaction demarcation in EJB by Aditya Anand on August 20 2001 03:36 EDT
- container managed transaction demarcation in EJB by Pritam Poojari on September 27 2001 07:17 EDT
-
container managed transaction demarcation in EJB by Aditya Anand on August 20 2001 03:36 EDT
- container managed transaction demarcation in EJB by Park In Geun on August 17 2001 20:01 EDT
-
container managed transaction demarcation in EJB[ Go to top ]
- Posted by: Mohan Navaratna
- Posted on: August 17 2001 14:45 EDT
- in response to Park In Geun
how about setting the rollbackonly flag ... ?
i.e catch these createException ot remove exception and set the rollbackonly flag .
I think that should work ...
let me know
mohan -
container managed transaction demarcation in EJB[ Go to top ]
- Posted by: Park In Geun
- Posted on: August 17 2001 20:01 EDT
- in response to Mohan Navaratna
i have already set rollbackOnly flag in RemoteException, but it does not work. -
container managed transaction demarcation in EJB[ Go to top ]
- Posted by: Aditya Anand
- Posted on: August 20 2001 15:36 EDT
- in response to Park In Geun
do not catch CreateException, it is a System Exception and will indicate to the container failure of the transaction, hense trigerring the rollback., use setRollbackOnly(), only if the rollback needs to be based on a business decision. -
container managed transaction demarcation in EJB[ Go to top ]
- Posted by: Pritam Poojari
- Posted on: September 27 2001 07:17 EDT
- in response to Aditya Anand
I am also facing the same problem. I am using Iplanet App server. Transactions work fine in business methods, but cause problems while using create methods.
I have tried calling setRollbackOnly(), but does not work.
Let me know anybody has any solution.