db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r382195 - /db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java
Date Wed, 01 Mar 2006 23:18:05 GMT
Author: kmarsden
Date: Wed Mar  1 15:18:01 2006
New Revision: 382195

URL: http://svn.apache.org/viewcvs?rev=382195&view=rev
Log:
[DERBY-1010] setTransactionIsolation can cause java.sql.SQLException: Invalid operation: statement
closed in some contexts with xa

port fix from trunk


Modified:
    db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java

Modified: db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java?rev=382195&r1=382194&r2=382195&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/Connection.java Wed
Mar  1 15:18:01 2006
@@ -831,7 +831,9 @@
                     "Transaction isolation level " + level + " is an invalid argument for
java.sql.Connection.setTransactionIsolation()." +
                     " See Javadoc specification for a list of valid arguments.", "XJ045");
         }
-        if (setTransactionIsolationStmt == null) {
+        if (setTransactionIsolationStmt == null  ||
+            !(setTransactionIsolationStmt.openOnClient_ &&
+              setTransactionIsolationStmt.openOnServer_)) {
             setTransactionIsolationStmt =
                     createStatementX(java.sql.ResultSet.TYPE_FORWARD_ONLY,
                             java.sql.ResultSet.CONCUR_READ_ONLY,



Mime
View raw message