• 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

MDB transaction rollback

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
no wonder he is so sad, he hasn't seen this 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