Method Summary |
|
protected void | assertInitializationAllowed() Throws an IllegalStateException, if a PooledConnection has already
been requested. |
abstract public void | close() Close pool being maintained by this datasource. |
public Connection | getConnection() Attempt to establish a database connection. |
public Connection | getConnection(String username, String password) Attempt to establish a database connection. |
public ConnectionPoolDataSource | getConnectionPoolDataSource() Get the value of connectionPoolDataSource. |
public String | getDataSourceName() Get the name of the ConnectionPoolDataSource which backs this pool. |
public int | getDefaultTransactionIsolation() Get the value of defaultTransactionIsolation, which defines the state of
connections handed out from this pool. |
public String | getDescription() Get the description. |
public String | getJndiEnvironment(String key) Get the value of jndiEnvironment which is used when instantiating
a jndi InitialContext. |
public PrintWriter | getLogWriter() Get the value of logWriter. |
public int | getLoginTimeout() Get the value of loginTimeout. |
public int | getMinEvictableIdleTimeMillis() Returns the minimum amount of time an object may sit idle in the pool
before it is eligable for eviction by the idle object evictor
(if any). |
public int | getNumTestsPerEvictionRun() Returns the number of objects to examine during each run of the
idle object evictor thread (if any). |
abstract protected PooledConnectionAndInfo | getPooledConnectionAndInfo(String username, String password) |
public Reference | getReference() Retrieves the Reference of this object.
Note: InstanceKeyDataSource subclasses
should override this method. |
public boolean | getTestOnBorrow() When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
before being returned by the {*link #borrowObject}
method. |
public boolean | getTestOnReturn() When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
before being returned to the pool within the
{*link #returnObject}. |
public boolean | getTestWhileIdle() When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
by the idle object evictor (if any). |
public int | getTimeBetweenEvictionRunsMillis() Returns the number of milliseconds to sleep between runs of the
idle object evictor thread. |
public String | getValidationQuery() The SQL query that will be used to validate connections from this pool
before returning them to the caller. |
public boolean | isDefaultAutoCommit() Get the value of defaultAutoCommit, which defines the state of
connections handed out from this pool. |
public boolean | isDefaultReadOnly() Get the value of defaultReadOnly, which defines the state of
connections handed out from this pool. |
public boolean | isRollbackAfterValidation() Whether a rollback will be issued after executing the SQL query
that will be used to validate connections from this pool
before returning them to the caller. |
final public boolean | isTestOnBorrow() |
final public boolean | isTestOnReturn() |
final public boolean | isTestWhileIdle() |
public void | setConnectionPoolDataSource(ConnectionPoolDataSource v) Set the backend ConnectionPoolDataSource. |
public void | setDataSourceName(String v) Set the name of the ConnectionPoolDataSource which backs this pool. |
public void | setDefaultAutoCommit(boolean v) Set the value of defaultAutoCommit, which defines the state of
connections handed out from this pool. |
public void | setDefaultReadOnly(boolean v) Set the value of defaultReadOnly, which defines the state of
connections handed out from this pool. |
public void | setDefaultTransactionIsolation(int v) Set the value of defaultTransactionIsolation, which defines the state of
connections handed out from this pool. |
public void | setDescription(String v) Set the description. |
public void | setJndiEnvironment(String key, String value) Sets the value of the given JNDI environment property to be used when
instantiating a JNDI InitialContext. |
public void | setLogWriter(PrintWriter v) Set the value of logWriter. |
public void | setLoginTimeout(int v) Set the value of loginTimeout. |
public void | setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis) Sets the minimum amount of time an object may sit idle in the pool
before it is eligable for eviction by the idle object evictor
(if any). |
public void | setNumTestsPerEvictionRun(int numTestsPerEvictionRun) Sets the number of objects to examine during each run of the
idle object evictor thread (if any).
When a negative value is supplied, ceil({*link #numIdle})/abs({*link #getNumTestsPerEvictionRun})
tests will be run. |
public void | setRollbackAfterValidation(boolean rollbackAfterValidation) Whether a rollback will be issued after executing the SQL query
that will be used to validate connections from this pool
before returning them to the caller. |
public void | setTestOnBorrow(boolean testOnBorrow) When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
before being returned by the {*link #borrowObject}
method. |
public void | setTestOnReturn(boolean testOnReturn) When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
before being returned to the pool within the
{*link #returnObject}. |
public void | setTestWhileIdle(boolean testWhileIdle) When true, objects will be
{*link PoolableObjectFactory#validateObject validated}
by the idle object evictor (if any). |
public void | setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) Sets the number of milliseconds to sleep between runs of the
idle object evictor thread. |
public void | setValidationQuery(String validationQuery) The SQL query that will be used to validate connections from this pool
before returning them to the caller. |
abstract protected void | setupDefaults(Connection con, String username) |
protected ConnectionPoolDataSource | testCPDS(String username, String password) |
protected byte | whenExhaustedAction(int maxActive, int maxWait) |