Author: kfujino
Date: Thu Jul 23 10:27:58 2015
New Revision: 1692372

URL: http://svn.apache.org/r1692372
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/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1692372&r1=1692371&r2=1692372&view=diff
==============================================================================
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Thu Jul 23 10:27:58 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);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to