Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Distributed Transaction

 
Rohit Dhodapkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rohit Dhodapkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know whether this gonna help you or not, but have look at this:
http://jotm.ow2.org/xwiki/bin/view/Main/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic