This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

XA vs non-XA

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Resolved by switching mySQL driver to com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic