ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject Connection Caching
Date Fri, 30 Mar 2007 17:09:47 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>I'm running
into a 
rather odd and difficult issue to nail down and I believe it is associated to 
the way connections are cached. </FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT face=Arial 
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>iBatis:</FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>Spring: 
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>Transaction
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>DB: Sybase ASE</FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>JDBC Driver:
JConnect 6.0</FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT face=Arial 
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>I've got a running

transaction that I suspend prior to an insert into a given table. (Long story as 
to why I suspend) When I suspend the TX the insert that I perform needs to be on 
a clean connection, one not associated with the transaction. (It seems either 
ASE or JConnect is </FONT></SPAN><SPAN class=062430217-30032007><FONT><FONT

face=Arial size=2>not really capable of running more than one transaction at a 
time on a single connection. This has something to do with implicit / explicit 
transaction demarcation. So when I need a connection to perform the insert I 
actually need a new connection. </FONT></FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT><FONT face=Arial 
<DIV><SPAN class=062430217-30032007><FONT><FONT face=Arial size=2>Is
there any 
way of configuring iBatis to do this type of behavior? As I debug the code I see 
in the UserProvidedTransaction class that it simply returns the connection it 
was given at time of instantiation, effectively this can be the same connection 
that was part of the TX.</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=062430217-30032007><FONT face=Arial 
<DIV><SPAN class=062430217-30032007><FONT face=Arial size=2>Thanks for the

<DIV><SPAN class=062430217-30032007></SPAN>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2>Chris Mathrusse</FONT></DIV>
<DIV align=left><FONT face=Arial size=2><A 
<DIV align=left><FONT face=Arial size=2>(925) 236-5553</FONT></DIV>

View raw message