• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

What happend CMT inside BMT ?? (see)

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't this nested transaction that aren't supported by current EJB?
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
brevity is the soul of wit - shakepeare. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic