Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apply transaction on two different database

 
Praveen Sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Came across a problem which I could not answer , so I was hoping that I get some replies which might help me gain some knowledge.

Scenarios:
The data access layer (DAO layer) has two connection objects lets say: connection1 and connection2. These two connection objects need to update two different databases.

Problem:
Apply transactions so that these two update operations work as an atomic operations. There is no restriction on were we can apply the transaction.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what distributed transactions do: http://docs.oracle.com/cd/E11882_01/java.112/e16548/xadistra.htm
 
Praveen Sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ulf. This will be quite a read.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic