Example usage for Java org.apache.commons.dbcp.datasources SharedPoolDataSource fields, constructors, methods, implement or subclass
The text is from its open source code.
SharedPoolDataSource() Default no-arg constructor for Serialization |
Connection | getConnection() Attempt to establish a database connection. |
ConnectionPoolDataSource | getConnectionPoolDataSource() Get the value of connectionPoolDataSource. |
String | getDataSourceName() Get the name of the ConnectionPoolDataSource which backs this pool. |
int | getDefaultTransactionIsolation() Get the value of defaultTransactionIsolation, which defines the state of connections handed out from this pool. |
String | getDescription() Get the description. |
String | getJndiEnvironment(String key) Get the value of jndiEnvironment which is used when instantiating a jndi InitialContext. |
int | getLoginTimeout() Get the value of loginTimeout. |
int | getMaxActive() The maximum number of active connections that can be allocated from this pool at the same time, or non-positive for no limit. |
int | getMaxIdle() The maximum number of active connections that can remain idle in the pool, without extra ones being released, or negative for no limit. |
int | getMaxWait() The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely. |
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). |
int | getNumTestsPerEvictionRun() Returns the number of objects to examine during each run of the idle object evictor thread (if any). |
int | getTimeBetweenEvictionRunsMillis() Returns the number of milliseconds to sleep between runs of the idle object evictor thread. |
String | getValidationQuery() The SQL query that will be used to validate connections from this pool before returning them to the caller. |
boolean | isDefaultAutoCommit() Get the value of defaultAutoCommit, which defines the state of connections handed out from this pool. |
boolean | isDefaultReadOnly() Get the value of defaultReadOnly, which defines the state of connections handed out from this pool. |
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. |
boolean | isTestOnBorrow() |
boolean | isTestOnReturn() |
boolean | isTestWhileIdle() |
void | setConnectionPoolDataSource(ConnectionPoolDataSource v) Set the backend ConnectionPoolDataSource. |
void | setMaxActive(int maxActive) The maximum number of active connections that can be allocated from this pool at the same time, or non-positive for no limit. |
void | setMaxIdle(int maxIdle) The maximum number of active connections that can remain idle in the pool, without extra ones being released, or negative for no limit. |
void | setMaxWait(int maxWait) The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely. |
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). |
void | setNumTestsPerEvictionRun(int numTestsPerEvictionRun) Sets the number of objects to examine during each run of the idle object evictor thread (if any). |
void | setTestOnBorrow(boolean testOnBorrow) When true, objects will be {*link PoolableObjectFactory#validateObject validated} before being returned by the {*link #borrowObject} method. |
void | setTestOnReturn(boolean testOnReturn) When true, objects will be {*link PoolableObjectFactory#validateObject validated} before being returned to the pool within the {*link #returnObject}. |
void | setTestWhileIdle(boolean testWhileIdle) When true, objects will be {*link PoolableObjectFactory#validateObject validated} by the idle object evictor (if any). |
void | setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis) Sets the number of milliseconds to sleep between runs of the idle object evictor thread. |
void | setValidationQuery(String validationQuery) The SQL query that will be used to validate connections from this pool before returning them to the caller. |