db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r392471 - /db/derby/code/branches/10.1/java/client/org/apache/derby/client/ClientPooledConnection.java
Date Sat, 08 Apr 2006 01:17:01 GMT
Author: kmarsden
Date: Fri Apr  7 18:16:59 2006
New Revision: 392471

URL: http://svn.apache.org/viewcvs?rev=392471&view=rev
Log:
DERBY-1144 With client PooledConnection.getConnection() does not reset holdability and isolation
state properly
DERBY-1044  [xa] client XAConnection.getConnection() does not have the correct default isolation
level if set by an earlier connection obtained from the same XAConnection


merge from trunk.  This part is just the code change.
Test change will follow once checkDataSource hang is resolved on trunk.
Verified fix manually.


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

Modified: db/derby/code/branches/10.1/java/client/org/apache/derby/client/ClientPooledConnection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/client/org/apache/derby/client/ClientPooledConnection.java?rev=392471&r1=392470&r2=392471&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/client/org/apache/derby/client/ClientPooledConnection.java
(original)
+++ db/derby/code/branches/10.1/java/client/org/apache/derby/client/ClientPooledConnection.java
Fri Apr  7 18:16:59 2006
@@ -138,20 +138,22 @@
         }
         createLogicalConnection();
 
-        if (!newPC_) {
-            physicalConnection_.reset(logWriter_, user_, password_, ds_, false); // false
means do not recompute
-        }
-        // properties from the dataSource
-        // properties don't change
-        else {
-            physicalConnection_.lightReset();    //poolfix
-        }
-        newPC_ = false;
+            if (!newPC_) {
+            	// DERBY-1144 changed the last parameter of this method to true
+            	// to reset the connection state to the default on 
+            	// PooledConnection.getConnection() otherwise the 
+            	// isolation level and holdability was not correct and out of sync with the
server.
+                physicalConnection_.reset(logWriter_, user_, password_, ds_, true);
+            }
+            else {
+                physicalConnection_.lightReset();    //poolfix
+            }
+            newPC_ = false;
 
-        if (logWriter_ != null) {
-            logWriter_.traceExit(this, "getConnection", logicalConnection_);
-        }
-        return logicalConnection_;
+            if (logWriter_ != null) {
+                logWriter_.traceExit(this, "getConnection", logicalConnection_);
+            }
+            return logicalConnection_;
     }
 
     private void createLogicalConnection() throws SqlException {



Mime
View raw message