commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Zoetebier <john.zoeteb...@transparent.co.nz>
Subject Re: DBCP oracle connections less than minActive ?
Date Fri, 05 Dec 2003 01:13:23 GMT
On Thu, 04 Dec 2003 23:26:08 +0100, Dirk Verbeeck 
<dirk.verbeeck@pandora.be> wrote:

> There is no property to "initially start up 's' connections".
> You can make a feature request for this if you want.

I use the following method to initialize some idle connections:
	/**
	 * Add an idle connections 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
	 * @param idleConnectionCount number of idleConnections
	 */
	public void addIdleConnection(int idleConnectionCount)
		throws Exception {
		
		for (int i=0; i < idleConnectionCount; i++) {
			connectionPool.addObject();
		}
	}

This method is in class DatabaseConnectionPool that encapsulated driver 
setup and DBCP initialization.
But a property may be the best way in a future release of DBCP.

-- 
John Zoetebier
Web site: http://www.transparent.co.nz


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message