ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject RE: Transaction Control across multiple datasources
Date Thu, 29 Mar 2007 15:35:24 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii" plain; text 
Content-Type: quoted-printable Content-Transfer-Encoding:>
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=659042715-29032007><FONT face=Arial 
color=#0000ff size=2>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 (<A href="http://bitronix.be/">http://bitronix.be/</A>) 
&nbsp;or Atomikos (<A 
href="http://www.atomikos.com/">http://www.atomikos.com/</A>). 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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=659042715-29032007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=659042715-29032007><FONT face=Arial 
color=#0000ff size=2>The configuration is relatively easy&nbsp;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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=659042715-29032007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=659042715-29032007><FONT face=Arial 
color=#0000ff size=2>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.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Seth Helstrip 
&lt;seth_helstrip@yahoo.com&gt; [mailto:Seth Helstrip 
&lt;seth_helstrip@yahoo.com&gt;] <BR><B>Sent:</B> Thursday, March
29, 2007 7:23 
AM<BR><B>To:</B> user-java@ibatis.apache.org<BR><B>Subject:</B>
Transaction 
Control across multiple datasources<BR></FONT><BR></DIV>
<DIV></DIV>I'm relatively new to iBatis and am hoping someone can <BR>offer
me 
some form of transaction management advise? <BR><BR>I'm using Spring MVC with

iBatis, and so far, have <BR>been mightily impressed with both technologies. 
<BR>Within my application I have the need to maintain <BR>transactions across

two datasources and daoconfig, <BR>each pointing at a different db 
implementation - one <BR>Oracle, one DB2. <BR><BR>Since I'm using Spring
I was 
wondering whether the <BR>best way to do this would be to use EXTERNAL 
<BR>transaction management within iBatis and to somehow <BR>span the two DAO 
activities using a Spring transaction <BR>mechanism. <BR><BR>I'm not using

Spring IoC - and as such, think this <BR>approach may require some messy coding. 
<BR><BR>Any advise will be greatly appreciated. <BR>Thanks in advance, <BR>Seth

<BR><BR><BR><BR>____________________________________________________________________________________

<BR>Be a PS3 game guru. <BR>Get your game face on with the latest PS3 news and

previews at Yahoo! Games. 
<BR>http://videogames.yahoo.com/platform?platform=120121 <BR><BR></BODY></HTML>


Mime
View raw message