Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMT txn propagation to CMT

 
seemapanth Joshi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • 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.
 
ashok kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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.
 
Amit G Piplani
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic