wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes What happend CMT inside BMT ?? (see) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "What happend CMT inside BMT ?? (see)" Watch "What happend CMT inside BMT ?? (see)" New topic
Author

What happend CMT inside BMT ?? (see)

Dilip Gamage
Ranch Hand

Joined: Sep 09, 2004
Posts: 148
This is what I understood... if there any errors please correct me

My problem is...

CMT (start)
|
|BMT (start)
|
|BMT (end)
|
|
CMT (end)



Let say CMT inside BMT(as above). According to theory once BMT execute it will suspend CMT temporarly. Then let say BMT will rollback due to some reason
What happend to CMT ??

what i understood from book is BMT will roll back, and CMT will never roll back. Is that applicable for reality ??
please just explain me if any one knows



Cheers<br />Dilip <br />SCJP 1.4 ,SCBCD 1.3
Grand Puba
Greenhorn

Joined: Oct 28, 2004
Posts: 11
I also think the BMT will roll back, and CMT will not roll back but in reality , the BMT method will probably throw an application exception to indicate this behaviour...

Greetz


"You don't need eyes to see, you need vision" -- Faithless
Sandesh Tathare
Ranch Hand

Joined: Jun 22, 2003
Posts: 82
Dilip,

When transaction started by BMT is rollback, transaction started by CMT will not be rollbacked and it will continue once BMT method call is completed.


Regards,<br />Sandesh<br />(SCJCP, SCWCD, SCBCD - 99%, OCP-1)<br /> <br />Either find a way or create one.
Yi Zou
Greenhorn

Joined: Mar 05, 2004
Posts: 14
Isn't this nested transaction that aren't supported by current EJB?
Arun Krishnamoorthy
Greenhorn

Joined: Nov 03, 2004
Posts: 22
No... a nested transaction would imply that there's a dependency between the CMT and BMT transaction but, there is no such relationship.

The BMT and CMT execute under separate,unrelated transactions.
Dilip Gamage
Ranch Hand

Joined: Sep 09, 2004
Posts: 148
Arun Krishnamoorthy says
The BMT and CMT execute under separate,unrelated transactions


Seperate ??
do you mean CMT suspended when executing BMT and behave seperately. But CMT nested transaction require to complete the BMT to commit the CMT as mention above ^

I didn't get the answer ? yet. Thanks you all attempt my problem
Arun Krishnamoorthy
Greenhorn

Joined: Nov 03, 2004
Posts: 22
Yes, the CMT transaction suspends before the BMT transaction is started.
Transactions can never propagate into a BMT bean. BMT beans always execute under their own transactions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What happend CMT inside BMT ?? (see)