public class PooledConnectionFactory extends Object implements ConnectionFactory
Modifier and Type | Field and Description |
---|---|
private ConnectionPool |
pool
Connection pool.
|
Constructor and Description |
---|
PooledConnectionFactory()
Default constructor.
|
PooledConnectionFactory(ConnectionPool cp)
Creates a new pooled connection factory.
|
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Returns a connection from the pool.
|
ConnectionPool |
getConnectionPool()
Returns the connection pool.
|
void |
setConnectionPool(ConnectionPool cp)
Sets the connection pool.
|
String |
toString() |
private ConnectionPool pool
public PooledConnectionFactory()
public PooledConnectionFactory(ConnectionPool cp)
cp
- connection poolpublic ConnectionPool getConnectionPool()
public void setConnectionPool(ConnectionPool cp)
cp
- connection poolpublic Connection getConnection() throws LdapException
getConnection
in interface ConnectionFactory
LdapException
- if a connection cannot be retrieved from the poolCopyright © 2003-2019 Virginia Tech. All Rights Reserved.