Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two phase commit

 
francis varkey
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am calling another application from my application . Some times my some of my application database operations getting failed . In this case , I need to roll back second application database operation also. For this what I have to do ? Both application are deployed in JBoss in different application.

Thanks
 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your both applications are independent of each other, I don't think you can do this implicitly.

One approach to address your problem could be to persist the old state before making any changes from the second application and if you found it is failed, you can restore the old state from the first application. I believe your roll back trigger is generating in the first application here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic