Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transactions across different databases  RSS feed

 
Sri Bala
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

If I have to use JTA and access different databases eg. oracle and mssqlserver within a single transaction, what all do I need to do?

Thanks in Advance,
Sri.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need two phase commit, XA drivers and the DBs must be XA-enabled. There should be a connection pool per DB and a correctly configured data source for each pool. Check your server documentation on how to do this.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you use Listener if you are using Servlet 2.3 Spec.
Shrinivas
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kindly ignore the message; Effect of multiple Javaranch Windows

Shrinivas
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also note that setting up XA support for some databases can be involved. SQLServer, for example, I believe depends upon Microsoft's transaction management service, and for some versions of the database you have to run a special post-installation script to load the XA support.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!