File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes XA vs non-XA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "XA vs non-XA" Watch "XA vs non-XA" New topic

XA vs non-XA

Eugene Wright

Joined: Mar 22, 2011
Posts: 10
I have a process that will be making connections to three different dabases using JNDI w/ Weblogic. The first two connections seemed fine and my code ran for months:

1) Connects to an Oracle db using XA driver (select only)
2) Connects to an Oracle db and then to another db using DBlink. This is a non-XA driver (again select only). I think I remember getting an error trying to use XA with a DBlink?

Now I'm trying to write a third connection to a mySQL database that will be performing inserts based on the data from the 2nd connection. I've tried to set up this connection as both a 1-phase and 2-phase commit without much luck. The error I'm getting says the context is already open for another transaction... however I'm closing all my connections after I'm through with them.

How am I to handle this? Thanks
Eugene Wright

Joined: Mar 22, 2011
Posts: 10
Resolved by switching mySQL driver to com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
subject: XA vs non-XA
Similar Threads
Oracle XA Data Source Problem using EJB
Error on Oracle while using DBLINK and XA transaction
Websphere 6.0 DataSource and Microsoft's JDBC driver
Connection Pooling - Urgent
Connection Pooling-Urgent