Author: kfujino
Date: Tue Aug 30 07:27:57 2016
New Revision: 1758338
URL: http://svn.apache.org/viewvc?rev=1758338&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/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
Modified:
tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1758338&r1=1758337&r2=1758338&view=diff
==============================================================================
---
tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
(original)
+++
tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Tue Aug 30 07:27:57 2016
@@ -922,6 +922,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();
@@ -1345,7 +1346,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/tc8.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1758338&r1=1758337&r2=1758338&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Tue Aug 30 07:27:57 2016
@@ -339,6 +339,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: [email protected]
For additional commands, e-mail: [email protected]