ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbe...@apache.org
Subject svn commit: r883153 - /ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java
Date Sun, 22 Nov 2009 21:42:31 GMT
Author: cbegin
Date: Sun Nov 22 21:42:30 2009
New Revision: 883153

URL: http://svn.apache.org/viewvc?rev=883153&view=rev
Log:
IBATIS-696 Potential connection problem when using managed transactions in iBATIS 3

Modified:
    ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java

Modified: ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java
URL: http://svn.apache.org/viewvc/ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java?rev=883153&r1=883152&r2=883153&view=diff
==============================================================================
--- ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java
(original)
+++ ibatis/java/ibatis-3/trunk/ibatis-3-core/src/main/java/org/apache/ibatis/executor/loader/ResultLoader.java
Sun Nov 22 21:42:30 2009
@@ -12,6 +12,7 @@
 import org.apache.ibatis.session.RowBounds;
 import org.apache.ibatis.transaction.Transaction;
 import org.apache.ibatis.transaction.TransactionFactory;
+import org.apache.ibatis.transaction.jdbc.JdbcTransaction;
 
 import javax.sql.DataSource;
 import java.sql.Connection;
@@ -81,14 +82,11 @@
     Environment environment = configuration.getEnvironment();
     if (environment == null)
       throw new ExecutorException("ResultLoader could not load lazily.  Environment was not
configured.");
-    TransactionFactory txFactory = environment.getTransactionFactory();
-    if (txFactory == null)
-      throw new ExecutorException("ResultLoader could not load lazily.  Transaction Factory
was not configured.");
     DataSource ds = environment.getDataSource();
     if (ds == null) throw new ExecutorException("ResultLoader could not load lazily.  DataSource
was not configured.");
     Connection conn = ds.getConnection();
     conn = wrapConnection(conn);
-    Transaction tx = txFactory.newTransaction(conn, false);
+    Transaction tx = new JdbcTransaction(conn, false);
     return configuration.newExecutor(tx, ExecutorType.SIMPLE);
   }
 



Mime
View raw message