Author: kfujino
Date: Thu Jul 23 10:30:15 2015
New Revision: 1692373
URL: http://svn.apache.org/r1692373
Log:
Eliminate the dependence on maxActive of busy queues and idle queue in order to
enable the expansion of the pool size via JMX.
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=1692373&r1=1692372&r2=1692373&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
Thu Jul 23 10:30:15 2015
@@ -29,7 +29,6 @@ import java.util.Iterator;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
-import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
@@ -439,7 +438,7 @@ public class ConnectionPool {
}
//make space for 10 extra in case we flow over a bit
- busy = new ArrayBlockingQueue<>(properties.getMaxActive(),false);
+ busy = new LinkedBlockingQueue<>();
//busy = new FairBlockingQueue<PooledConnection>();
//make space for 10 extra in case we flow over a bit
if (properties.isFairQueue()) {
@@ -448,7 +447,7 @@ public class ConnectionPool {
//idle = new LinkedTransferQueue<PooledConnection>();
//idle = new
ArrayBlockingQueue<PooledConnection>(properties.getMaxActive(),false);
} else {
- idle = new
ArrayBlockingQueue<>(properties.getMaxActive(),properties.isFairQueue());
+ idle = new LinkedBlockingQueue<>();
}
initializePoolCleaner(properties);
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=1692373&r1=1692372&r2=1692373&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Jul 23 10:30:15 2015
@@ -137,6 +137,11 @@
via jmx, it should restart the pool cleaner because this attribute
affects the execution interval of the pool cleaner. (kfujino)
</fix>
+ <fix>
+ Eliminate the dependence on <code>maxActive</code> of busy queues and
+ idle queue in order to enable the expansion of the pool size via JMX.
+ (kfujino)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]