aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Apply transaction on two different database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Apply transaction on two different database" Watch "Apply transaction on two different database" New topic
Author

Apply transaction on two different database

Praveen Sharma
Ranch Hand

Joined: Jul 31, 2008
Posts: 129
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.


SCJP 80% SCWCD 89%
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42955
    
  73
That's what distributed transactions do: http://docs.oracle.com/cd/E11882_01/java.112/e16548/xadistra.htm
Praveen Sharma
Ranch Hand

Joined: Jul 31, 2008
Posts: 129
Thanks a lot Ulf. This will be quite a read.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apply transaction on two different database