This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Distributed Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Distributed Transaction" Watch "Distributed Transaction" New topic
Author

Distributed Transaction

Rohit Dhodapkar
Ranch Hand

Joined: Apr 27, 2006
Posts: 38
Hi All,

I have developed standalone program which talks to two different oracle databases. As the program is small it doesn't require a application server to run on. The sql inserts on two different oracle database should happen in a trasaction. I won't be able to use sophisticated JTA or EJBs as they run inside container. I am left with using JDBC transactions. I am aware that JDBC transactions aren't distributed. Please can somebody suggest any way of achiving distributed transaction behaviour with JDBC?

Cheers,
Rohit
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Rohit Dhodapkar wrote:I am aware that JDBC transactions aren't distributed. Please can somebody suggest any way of achiving distributed transaction behaviour with JDBC?

I really do NOT use JDBC distributed transaction, but there is a facility provided by JDBC 3.0 to use connection for distributed transaction. Look this advanced JDBC tutorial link and chapter 3.7.5 and 3.7.6


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Rohit Dhodapkar
Ranch Hand

Joined: Apr 27, 2006
Posts: 38
Thanks sagar, but the document you suggested uses distributed transaction using application server. I am running stanalone batch job. Is there any way of handling distributed transaction then?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Don't know whether this gonna help you or not, but have look at this:
http://jotm.ow2.org/xwiki/bin/view/Main/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Distributed Transaction
 
Similar Threads
Connecting to multiple databases using different jdbc drivers
JDBC level transaction vs. JTA/JTS
About Distributed Transactions
distributed transactions
Distributed transactions