Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleCreating a CachedConnectionPool
ConnectionPool connections = ConnectionPool.newCachedConnectionPool(host, port, username, password);

Usage

Code Block
languagejava
// assumes that the connection pool has been previously created
Concourse connection = null;
try{
	connection = pool.request();
	// do stuff
}
finally {
	if(connection != null){
		pool.release(connection);
	}
}

 

API Documentation

The API for fixed and cached connection pools is the same.

close

Code Block
void close() throws Exception

...