tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r1335546 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
Date Tue, 08 May 2012 14:17:43 GMT
Author: fhanik
Date: Tue May  8 14:17:43 2012
New Revision: 1335546

URL: http://svn.apache.org/viewvc?rev=1335546&view=rev
Log:
When a connection is disconnected, make sure we reset the cached values. This can happen during
a failed validation when reconnect() is called.


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

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java?rev=1335546&r1=1335545&r2=1335546&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/ConnectionState.java
Tue May  8 14:17:43 2012
@@ -110,6 +110,19 @@ public class ConnectionState extends Jdb
 
     }
 
+
+    @Override
+    public void disconnected(ConnectionPool parent, PooledConnection con, boolean finalizing)
{
+        //we are resetting, reset our defaults
+        autoCommit = null;
+        transactionIsolation = null;
+        readOnly = null;
+        catalog = null;
+        super.disconnected(parent, con, finalizing);
+    }
+
+
+
     @Override
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
         String name = method.getName();



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


Mime
View raw message