List of usage examples for org.apache.commons.pool.impl GenericObjectPool setConfig
public synchronized void setConfig(GenericObjectPool.Config conf)
From source file:edu.illinois.enforcemop.examples.apache.pool.TestGenericObjectPool.java
public void testSetConfig() throws Exception { GenericObjectPool.Config expected = new GenericObjectPool.Config(); GenericObjectPool pool = new GenericObjectPool(); assertConfiguration(expected, pool); expected.maxActive = 2;/*from w ww . ja va 2s . c o m*/ expected.maxIdle = 3; expected.maxWait = 5L; expected.minEvictableIdleTimeMillis = 7L; expected.numTestsPerEvictionRun = 9; expected.testOnBorrow = true; expected.testOnReturn = true; expected.testWhileIdle = true; expected.timeBetweenEvictionRunsMillis = 11L; expected.whenExhaustedAction = GenericObjectPool.WHEN_EXHAUSTED_GROW; pool.setConfig(expected); assertConfiguration(expected, pool); }