Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MDB transaction rollback  RSS feed

 
sh. garg
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a message driven bean whose onJob method is annotated as requires new transaction.The code looks something like below
@new transaction
onJob(){

method1();
method2();

}

@new tarnsaction
method1(){

MDBContext.setRollbackOnly();
}

@new transaction
method2(){

}

now here eventhough i call rollback for transaction of method1
even data in method2 gets rolled back ?

is it the if we call MDBContext.setRollBackOnly all the transaction for that MDBContext get rolled back?
 
Kingsly Theodar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't it that MDB should have onMessage method (which is the callback method for the container). Can one MDB have multiple method at first place?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!