You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2007/09/07 20:35:19 UTC
svn commit: r573662 -
/commons/sandbox/performance/trunk/src/java/org/apache/commons/performance/pool/PoolSoak.java
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();
- }
}
/**