Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to rollback a distributed transation  RSS feed

 
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!