...
Code Block |
---|
language | java |
---|
title | Creating a CachedConnectionPool |
---|
|
ConnectionPool connections = ConnectionPool.newCachedConnectionPool(host, port, username, password); |
Usage
Code Block |
---|
|
// 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 |
...