commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r573662 - /commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
Date Fri, 07 Sep 2007 18:35:19 GMT
Author: psteitz
Date: Fri Sep  7 11:35:18 2007
New Revision: 573662

URL: http://svn.apache.org/viewvc?rev=573662&view=rev
Log:
Added missing configuration for AbandonedObjectPool, dropped initial seeding.

Modified:
    commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java

Modified: commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
URL: http://svn.apache.org/viewvc/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java?rev=573662&r1=573661&r2=573662&view=diff
==============================================================================
--- commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
(original)
+++ commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
Fri Sep  7 11:35:18 2007
@@ -131,6 +131,17 @@
                     testWhileIdle);
         } else if (poolType.equals("AbandonedObjectPool")) {
             pool = new AbandonedObjectPool(null,abandonedConfig);
+            pool.setMaxActive(maxActive);
+            pool.setWhenExhaustedAction(exhaustedAction);
+            pool.setMaxWait(maxWait);
+            pool.setMaxIdle(maxIdle);
+            pool.setMinIdle(minIdle);
+            pool.setTestOnBorrow(testOnBorrow);
+            pool.setTestOnReturn(testOnReturn);
+            pool.setTimeBetweenEvictionRunsMillis(timeBetweenEvictions);
+            pool.setNumTestsPerEvictionRun(testsPerEviction);
+            pool.setMinEvictableIdleTimeMillis(idleTimeout);
+            pool.setTestWhileIdle(testWhileIdle);
         } else {
             throw new ConfigurationException(
                     "invalid pool type configuration: " + poolType);
@@ -150,10 +161,6 @@
         logger.info(" testsPerEviction: " + pool.getNumTestsPerEvictionRun());
         logger.info(" idleTimeout: " + pool.getMinEvictableIdleTimeMillis());
         
-        // put a few instances in the pool to start
-        for (int i = 0; i < 10; i++) {
-            pool.addObject();
-        }
     }
     
     /**



Mime
View raw message