wood burning stoves*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes setRollBack() Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "setRollBack() Query" Watch "setRollBack() Query" New topic
Author

setRollBack() Query

sanneel paul
Ranch Hand

Joined: Jun 26, 2005
Posts: 47
If CMT transaction calls BMT method, CMT transaction suspended and BMT starts its own transaction by temporarily suspending CMT transaction, now if we marked setRollback() into BMT,does it means that CMT transaction will also not get commit or i have to understand that that are 2 different transaction.

According to what i understand was CMT ->propogate->BMT so both are individual transaction and will make not difference to CMT if BMT make setrollBack(), BMT transaction will not commit but has no effect on CMT.

Can anybody help me out in this case.

Sanneel
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
You are correct. The rollback on the BMT transaction has no effect on the suspended CMT transaction. The CMT transaction "doesn't know" about the BMT transaction - it may commit despite the rollback on the BMT transaction or it could rollback because its running into different problems entirely.


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setRollBack() Query
 
Similar Threads
EJB3 is it possible to mix BMT and CMT?
BMP transaction propagation v nested transaction
using setRollbackOnly in BMT
Some doubts with transactions(Please help).
Difference between rollback() & setRollbackOnly()