Hello,
I'm using the dbcp, which works fine. The only thing a noticed is that although I explicitly set minIdle to 1, there's no connection to the database opened when the server starts up and the context is loaded. Instead the first connection is created with the first call to getConnection(). There's no problem in general with it since the connection time is negligible low, but I'd like to know if I'm just getting something wrong or if the implementation of minIdle in dbcp isn't correct.
minIdle does not create any idle connections.
It merely instructs DBCP to keep minIdle connections after returning to the pool.
You can handle this as follows:
/**
* Add an idle connection to the connection pool
* Purpose: pre-loading of idle connections speeds of connection time by client
* Note: maximum number of idle connections will never exceed maximum number of idle connections
*/
public void addIdleConnection()
throws Exception {
connectionPool.addObject();
}
-- John Zoetebier Web site: http://www.transparent.co.nz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
