Author: kfujino Date: Tue Aug 30 07:28:58 2016 New Revision: 1758339 URL: http://svn.apache.org/viewvc?rev=1758339&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=60043 Ensure that the suspectTimeout works without removing connection when the removeAbandoned is disabled.
Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1758339&r1=1758338&r2=1758339&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java (original) +++ tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java Tue Aug 30 07:28:58 2016 @@ -925,6 +925,7 @@ public class ConnectionPool { * @return true if the connection should be abandoned */ protected boolean shouldAbandon() { + if (!poolProperties.isRemoveAbandoned()) return false; if (poolProperties.getAbandonWhenPercentageFull()==0) return true; float used = busy.size(); float max = poolProperties.getMaxActive(); @@ -1349,7 +1350,8 @@ public class ConnectionPool { stopRunning(); } else if (!pool.isClosed()) { try { - if (pool.getPoolProperties().isRemoveAbandoned()) + if (pool.getPoolProperties().isRemoveAbandoned() + || pool.getPoolProperties().getSuspectTimeout() > 0) pool.checkAbandoned(); if (pool.getPoolProperties().getMinIdle() < pool.idle .size()) Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1758339&r1=1758338&r2=1758339&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Aug 30 07:28:58 2016 @@ -280,6 +280,11 @@ Ensure that the <code>ResultSet</code> is returned as Proxy object when enabling the <code>StatementDecoratorInterceptor</code>. (kfujino) </fix> + <fix> + <bug>60043</bug>: Ensure that the <code>suspectTimeout</code> works + without removing connection when the <code>removeAbandoned</code> is + disabled. (kfujino) + </fix> </changelog> </subsection> <subsection name="Other"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org