• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Distributed Transaction

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic