Author: kfujino
Date: Wed Jul 22 07:19:13 2015
New Revision: 1692228
URL: http://svn.apache.org/r1692228
Log:
If the timeBetweenEvictionRunsMillis attribute is changed via jmx, it should
restart the pool cleaner because this attribute affects the execution interval
of the pool cleaner.
Modified:
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/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/jmx/ConnectionPool.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java?rev=1692228&r1=1692227&r2=1692228&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java
(original)
+++
tomcat/tc7.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java
Wed Jul 22 07:19:13 2015
@@ -634,8 +634,14 @@ public class ConnectionPool extends Noti
getPoolProperties().setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
boolean shouldBeEnabled = getPoolProperties().isPoolSweeperEnabled();
//make sure pool cleaner starts/stops when it should
- if (!wasEnabled && shouldBeEnabled)
pool.initializePoolCleaner(getPoolProperties());
- else if (wasEnabled && !shouldBeEnabled) pool.terminatePoolCleaner();
+ if (!wasEnabled && shouldBeEnabled) {
+ pool.initializePoolCleaner(getPoolProperties());
+ } else if (wasEnabled) {
+ pool.terminatePoolCleaner();
+ if (shouldBeEnabled) {
+ pool.initializePoolCleaner(getPoolProperties());
+ }
+ }
}
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=1692228&r1=1692227&r2=1692228&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jul 22 07:19:13 2015
@@ -131,6 +131,11 @@
<code>ignoreExceptionOnPreLoad</code> attribute do not allow a change
via JMX. (kfujino)
</fix>
+ <fix>
+ If the <code>timeBetweenEvictionRunsMillis</code> attribute is changed
+ via jmx, it should restart the pool cleaner because this attribute
+ affects the execution interval of the pool cleaner. (kfujino)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]