I'm using iBatis with Spring for XA and have no problems.
It is difficult getting all the technologies to play together but XA is
difficult and it requires a bit of patience. I'm currently using Spring 2.0.2
with iBatis 2.3.0. My transaction manager is Bitronix as I am not running within
JBoss. It works exceptionally well and is very easy to
configure.
One thing you need to make certain of is that you read the
documentation carefully pertaining to the JDBC drivers you are using. I tried
the jTDS driver but seeing as I am running against Sybase ASE, jTDS was not a
good choice as it does not fully implement XA to whereas JConnect does. I
believe jTDS does support XA for SQL Server but only if you have executed the
SQL script supplied with it and have installed the dll. So make certain that you
have performed everything that the JDBC documentation
outlines.
From: Mark Volkmann <[EMAIL PROTECTED]> [mailto:Mark Volkmann <[EMAIL PROTECTED]>]
Sent: Friday, April 20, 2007 8:45 AM
To: [email protected]
Subject: nearly time to give up on XA
work. It's a complicated soup of technologies that have to come
together. I'm using the following.
* JBoss 4.0.5
* Spring 2.0.2
* iBATIS 2.3.0
* Abator 1.0.0 (generates Spring DAOs for iBATIS)
* Oracle 9i and the i-net GATE JDBC driver
* SQL Server 2000 and the JTDS 1.2 JDBC driver
There are just too many parts to get straight!
* spring-beans.xml
* oracle-ds.xml
* sqlserver-ds.xml
* an Abator configuration file for each database
* an iBATIS SqlMapConfig.xml file for each database
* jboss-web.xml
Due to all the variables in tool selection, it's really difficult to
find an example on the web that matches your specific situation.
My code runs fine, but when I purposely throw a RuntimeException to
force a database rollback, it doesn't rollback. The acts as though
it's configured to do an autocommit after every database operation.
I think what I need to see is examples of configuring XA datasources
in JBoss for
* Oracle using the i-net GATE JDBC driver
* SQL Server using the JTDS JDBC driver
I'd really appreciated it if someone could email those to me.
