/** * Sets the configuration. * @param conf the new configuration to use. * @see GenericKeyedObjectPool.Config */ public synchronized void setConfig(GenericKeyedObjectPool.Config conf) { setMaxIdle(conf.maxIdle); setMaxActive(conf.maxActive); setMaxTotal(conf.maxTotal); setMinIdle(conf.minIdle); setMaxWait(conf.maxWait); setWhenExhaustedAction(conf.whenExhaustedAction); setTestOnBorrow(conf.testOnBorrow); setTestOnReturn(conf.testOnReturn); setTestWhileIdle(conf.testWhileIdle); setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun); setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis); setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis); }
/** * @see org.apache.commons.pool.impl.GenericKeyedObjectPool#setNumTestsPerEvictionRun(int) */ public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { this.keyedObjectPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); }
/** * @see org.apache.commons.pool.impl.GenericKeyedObjectPool#setNumTestsPerEvictionRun(int) */ public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { this.keyedObjectPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); }
/** * @see org.apache.commons.pool.impl.GenericKeyedObjectPool#setNumTestsPerEvictionRun(int) */ public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { this.keyedObjectPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); }
/** * @see org.apache.commons.pool.impl.GenericKeyedObjectPool#setNumTestsPerEvictionRun(int) */ public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { this.keyedObjectPool.setNumTestsPerEvictionRun(numTestsPerEvictionRun); }
/** * Sets the configuration. * @param conf the new configuration to use. * @see GenericKeyedObjectPool.Config */ public synchronized void setConfig(GenericKeyedObjectPool.Config conf) { setMaxIdle(conf.maxIdle); setMaxActive(conf.maxActive); setMaxTotal(conf.maxTotal); setMinIdle(conf.minIdle); setMaxWait(conf.maxWait); setWhenExhaustedAction(conf.whenExhaustedAction); setTestOnBorrow(conf.testOnBorrow); setTestOnReturn(conf.testOnReturn); setTestWhileIdle(conf.testWhileIdle); setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun); setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis); setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis); }
/** * Sets the configuration. * @param conf the new configuration to use. * @see GenericKeyedObjectPool.Config */ public synchronized void setConfig(GenericKeyedObjectPool.Config conf) { setMaxIdle(conf.maxIdle); setMaxActive(conf.maxActive); setMaxTotal(conf.maxTotal); setMinIdle(conf.minIdle); setMaxWait(conf.maxWait); setWhenExhaustedAction(conf.whenExhaustedAction); setTestOnBorrow(conf.testOnBorrow); setTestOnReturn(conf.testOnReturn); setTestWhileIdle(conf.testWhileIdle); setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun); setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis); setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis); }
/** * Sets the configuration. * @param conf the new configuration to use. * @see GenericKeyedObjectPool.Config */ public synchronized void setConfig(GenericKeyedObjectPool.Config conf) { setMaxIdle(conf.maxIdle); setMaxActive(conf.maxActive); setMaxTotal(conf.maxTotal); setMinIdle(conf.minIdle); setMaxWait(conf.maxWait); setWhenExhaustedAction(conf.whenExhaustedAction); setTestOnBorrow(conf.testOnBorrow); setTestOnReturn(conf.testOnReturn); setTestWhileIdle(conf.testWhileIdle); setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun); setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis); setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis); }
/** * Sets the configuration. * @param conf the new configuration to use. * @see GenericKeyedObjectPool.Config */ public synchronized void setConfig(GenericKeyedObjectPool.Config conf) { setMaxIdle(conf.maxIdle); setMaxActive(conf.maxActive); setMaxTotal(conf.maxTotal); setMinIdle(conf.minIdle); setMaxWait(conf.maxWait); setWhenExhaustedAction(conf.whenExhaustedAction); setTestOnBorrow(conf.testOnBorrow); setTestOnReturn(conf.testOnReturn); setTestWhileIdle(conf.testWhileIdle); setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun); setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis); setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis); }
private void registerPool( String username, String password) throws javax.naming.NamingException, SQLException { ConnectionPoolDataSource cpds = testCPDS(username, password); // Create an object pool to contain our PooledConnections GenericKeyedObjectPool tmpPool = new GenericKeyedObjectPool(null); tmpPool.setMaxActive(getMaxActive()); tmpPool.setMaxIdle(getMaxIdle()); tmpPool.setMaxWait(getMaxWait()); tmpPool.setWhenExhaustedAction(whenExhaustedAction(maxActive, maxWait)); tmpPool.setTestOnBorrow(getTestOnBorrow()); tmpPool.setTestOnReturn(getTestOnReturn()); tmpPool.setTimeBetweenEvictionRunsMillis( getTimeBetweenEvictionRunsMillis()); tmpPool.setNumTestsPerEvictionRun(getNumTestsPerEvictionRun()); tmpPool.setMinEvictableIdleTimeMillis(getMinEvictableIdleTimeMillis()); tmpPool.setTestWhileIdle(getTestWhileIdle()); pool = tmpPool; // Set up the factory we will use (passing the pool associates // the factory with the pool, so we do not have to do so // explicitly) factory = new KeyedCPDSConnectionFactory(cpds, pool, getValidationQuery(), isRollbackAfterValidation()); }
private void registerPool( String username, String password) throws javax.naming.NamingException, SQLException { ConnectionPoolDataSource cpds = testCPDS(username, password); // Create an object pool to contain our PooledConnections GenericKeyedObjectPool tmpPool = new GenericKeyedObjectPool(null); tmpPool.setMaxActive(getMaxActive()); tmpPool.setMaxIdle(getMaxIdle()); tmpPool.setMaxWait(getMaxWait()); tmpPool.setWhenExhaustedAction(whenExhaustedAction(maxActive, maxWait)); tmpPool.setTestOnBorrow(getTestOnBorrow()); tmpPool.setTestOnReturn(getTestOnReturn()); tmpPool.setTimeBetweenEvictionRunsMillis( getTimeBetweenEvictionRunsMillis()); tmpPool.setNumTestsPerEvictionRun(getNumTestsPerEvictionRun()); tmpPool.setMinEvictableIdleTimeMillis(getMinEvictableIdleTimeMillis()); tmpPool.setTestWhileIdle(getTestWhileIdle()); pool = tmpPool; // Set up the factory we will use (passing the pool associates // the factory with the pool, so we do not have to do so // explicitly) new KeyedCPDSConnectionFactory(cpds, pool, getValidationQuery(), isRollbackAfterValidation()); }
private void registerPool( String username, String password) throws javax.naming.NamingException, SQLException { ConnectionPoolDataSource cpds = testCPDS(username, password); // Create an object pool to contain our PooledConnections GenericKeyedObjectPool tmpPool = new GenericKeyedObjectPool(null); tmpPool.setMaxActive(getMaxActive()); tmpPool.setMaxIdle(getMaxIdle()); tmpPool.setMaxWait(getMaxWait()); tmpPool.setWhenExhaustedAction(whenExhaustedAction(maxActive, maxWait)); tmpPool.setTestOnBorrow(getTestOnBorrow()); tmpPool.setTestOnReturn(getTestOnReturn()); tmpPool.setTimeBetweenEvictionRunsMillis( getTimeBetweenEvictionRunsMillis()); tmpPool.setNumTestsPerEvictionRun(getNumTestsPerEvictionRun()); tmpPool.setMinEvictableIdleTimeMillis(getMinEvictableIdleTimeMillis()); tmpPool.setTestWhileIdle(getTestWhileIdle()); pool = tmpPool; // Set up the factory we will use (passing the pool associates // the factory with the pool, so we do not have to do so // explicitly) factory = new KeyedCPDSConnectionFactory(cpds, pool, getValidationQuery(), isRollbackAfterValidation()); }