tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1170485 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
Date Wed, 14 Sep 2011 09:05:40 GMT
Author: kfujino
Date: Wed Sep 14 09:05:40 2011
New Revision: 1170485

URL: http://svn.apache.org/viewvc?rev=1170485&view=rev
Log:
Additional fix for r1170479.
Make sure calling disconnect() when only setDiscarded(true) is called and the real connection
is not closed.

Modified:
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?rev=1170485&r1=1170484&r2=1170485&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
Wed Sep 14 09:05:40 2011
@@ -309,7 +309,7 @@ public class PooledConnection {
      * @param finalize if set to true, a call to {@link ConnectionPool#finalize(PooledConnection)}
is called.
      */
     private void disconnect(boolean finalize) {
-        if (isDiscarded()) {
+        if (isDiscarded() && connection == null) {
             return;
         }
         setDiscarded(true);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message