ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Helstrip <seth_helst...@yahoo.com>
Subject RE: Transaction Control across multiple datasources
Date Fri, 30 Mar 2007 07:57:09 GMT
Hi Christopher,
Thanks for the clarification.  I fully agree, that the
db2 side is a potential concern.  I'm further hindered
by the fact that my db2 db is located on an AS400
(life is never easy huh!), and so am forced to use
their JOpen Toolkit.

I'm now probably going to spend a day or two lost in
the IBM 'documentation'.

Thanks again,

--- Christopher.Mathrusse@sybase.com wrote:

You should use Spring to manage all of your objects,
that includes your Dao's. Next you will need to use an
external Transaction Manager that supports XA 2pc.
There are several out there to choose from. I would
recommend Bitronix (http://bitronix.be/)  or Atomikos
(http://www.atomikos.com/). Lastly you will need to
leverage Springs Transaction Management. My
recommendation would be to use Annotations. This give
granular control over your transaction boundaries. The
Spring reference guide gives very good details of how
to perform this.
The configuration is relatively easy to do so long as
you read the docs and understand what it is you are
doing. XA is not easy but with Spring and a good TX
Manager it becomes seamless.
BTW, last time I used Oracle with DB2 I was unable to
use 2PC with DB2's type 4 JDBC driver. You should read
through the documentation pertaining to the Driver to
ensure that it supports 2PC. I know for a fact that
DB2's type 2 driver does.

From: Seth Helstrip <seth_helstrip@yahoo.com>
[mailto:Seth Helstrip <seth_helstrip@yahoo.com>] 
Sent: Thursday, March 29, 2007 7:23 AM
To: user-java@ibatis.apache.org
Subject: Transaction Control across multiple

I'm relatively new to iBatis and am hoping someone can

offer me some form of transaction management advise? 

I'm using Spring MVC with iBatis, and so far, have 
been mightily impressed with both technologies. 
Within my application I have the need to maintain 
transactions across two datasources and daoconfig, 
each pointing at a different db implementation - one 
Oracle, one DB2. 

Since I'm using Spring I was wondering whether the 
best way to do this would be to use EXTERNAL 
transaction management within iBatis and to somehow 
span the two DAO activities using a Spring transaction


I'm not using Spring IoC - and as such, think this 
approach may require some messy coding. 

Any advise will be greatly appreciated. 
Thanks in advance, 


Be a PS3 game guru. 
Get your game face on with the latest PS3 news and
previews at Yahoo! Games. 

TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.

View raw message