Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Java transaction service  RSS feed

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to use Java Transaction service for distributed transaction management in my Java application.

I have 3 different databases to which I have to connect using 3 different Connection objects. I want to insert certain data in each of the 3 databases.
My requirement is that atomicity should be maintained. So either data should get inserted in all 3 databases or it should not get inserted in any of the databases.
I searched on net for this kind of transactions and I got .
I could find its API here
But I am still not getting how implement transactions using it. Can somebody provide me with links to sample code or tutorials of Java Transaction Service.

Thanks in Advance,
Aniket Kedari
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK you will have to use some Application Server like IBM WebSphere or Weblogic that implements these APIs and then use TransacationManager to manage the transaction.
Please check your server's vendor documentation if you are using any.
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
how do I do my own kindle-like thing - without amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!