Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to rollback a distributed transation

 
Raj Jindal
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we rollback a distributed transaction in java. If we are using CMP or BMP EJB, is there anyway to rollback the transaction that is deployed on distributed servers.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container handles the rollback of the JTA transaction for you, whether initiated by itself upon receiving a RuntimeException or after invoking the setRollBackOnl´┐Ży() method you have placed in your code. I presume that your data sources are XA-enabled and that you are using XA drivers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic