Author: kfujino
Date: Thu Jul 23 10:31:39 2015
New Revision: 1692375
URL: http://svn.apache.org/r1692375
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/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=1692375&r1=1692374&r2=1692375&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
Thu Jul 23 10:31:39 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;
@@ -441,7 +440,7 @@ public class ConnectionPool {
}
//make space for 10 extra in case we flow over a bit
- busy = new
ArrayBlockingQueue<PooledConnection>(properties.getMaxActive(),false);
+ busy = new LinkedBlockingQueue<PooledConnection>();
//busy = new FairBlockingQueue<PooledConnection>();
//make space for 10 extra in case we flow over a bit
if (properties.isFairQueue()) {
@@ -450,7 +449,7 @@ public class ConnectionPool {
//idle = new LinkedTransferQueue<PooledConnection>();
//idle = new
ArrayBlockingQueue<PooledConnection>(properties.getMaxActive(),false);
} else {
- idle = new
ArrayBlockingQueue<PooledConnection>(properties.getMaxActive(),properties.isFairQueue());
+ idle = new LinkedBlockingQueue<PooledConnection>();
}
initializePoolCleaner(properties);
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=1692375&r1=1692374&r2=1692375&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jul 23 10:31:39 2015
@@ -136,6 +136,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]