Hi All,
When using DBCP what parameter needs to be set on the ObjectPool so that a
minimum number of connections are created when the pool instance is created
?? I thought the setMinIdle() does this, but doesn't look so.
The code I use:
try {
Class.forName(driver).newInstance();
System.out.println("No Errors occured 1");
} catch (Exception e) {
System.out.println("class for name failed" + e);
}
connectionPool = new GenericObjectPool(null);
connectionPool.setMaxActive(maxConn);
connectionPool.setMinIdle(minConn);
//connectionPool.setWhenExhaustedAction(connectionPool.WHEN_EXHAUSTED_GROW);
-- NEED TO TEST THIS!!!
ConnectionFactory connectionFactory = new
DriverManagerConnectionFactory(URL,null);
PoolableConnectionFactory poolableConnectionFactory = new
PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,t
rue);
ds = new PoolingDataSource(connectionPool);
System.out.println("Data source inited successfuly");
Thanks,
Arun N
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]