• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

BMT txn propagation to CMT

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a method call is made from BMT Bean with Txn attribute as "required" to a CMT bean method again with txn. attribute set to "required". Then the CMT bean calls context.setRollbackOnly(). How would the BMT UserTransaction.getStatus() call know that the txn. has been set for rollback, if it is made.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi joshi,
Once a txn from BMT goes into CMP with the same txn .It cann't come back to bmp with the same txn.Bcoz a txn can propagate from BMP into CMP But a txn from CMP can't propogate into BMP.
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the transaction is started by BMT and CMT is also working under the same transaction context. I still think calling setRollbakOnly should rollback the same transaction for BMT also and UserTransaction.getStatus() should give you back rollback status b'coz we are working on the samx Txn.
 
seemapanth Joshi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ashok & Amit,

Ashok:


CMP can't propogate into BMP


That is true but in this case the txn. is not propagating back but is running in the same txn. that it received from BMT and is affecting it by calling setRollbackOnly.

Amit:


I still think calling setRollbakOnly should rollback the same transaction for BMT also and UserTransaction.getStatus() should give you back rollback status b'coz we are working on the samx Txn.


I think the same way, but I just wanted to know how would the getStatus() return the txn. rolled back status.
 
My, my, aren't you a big fella. Here, have a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic