Java org.apache.commons.dbcp.datasources SharedPoolDataSource fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.dbcp.datasources SharedPoolDataSource fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.dbcp.datasources SharedPoolDataSource.

The text is from its open source code.

Subclass

org.apache.commons.dbcp.datasources.SharedPoolDataSource has subclasses.
Click this link to see all its subclasses.

Constructor

SharedPoolDataSource()
Default no-arg constructor for Serialization

Method

ConnectiongetConnection()
Attempt to establish a database connection.
ConnectionPoolDataSourcegetConnectionPoolDataSource()
Get the value of connectionPoolDataSource.
StringgetDataSourceName()
Get the name of the ConnectionPoolDataSource which backs this pool.
intgetDefaultTransactionIsolation()
Get the value of defaultTransactionIsolation, which defines the state of connections handed out from this pool.
StringgetDescription()
Get the description.
StringgetJndiEnvironment(String key)
Get the value of jndiEnvironment which is used when instantiating a jndi InitialContext.
intgetLoginTimeout()
Get the value of loginTimeout.
intgetMaxActive()
The maximum number of active connections that can be allocated from this pool at the same time, or non-positive for no limit.
intgetMaxIdle()
The maximum number of active connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
intgetMaxWait()
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.
intgetMinEvictableIdleTimeMillis()
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).
intgetNumTestsPerEvictionRun()
Returns the number of objects to examine during each run of the idle object evictor thread (if any).
intgetTimeBetweenEvictionRunsMillis()
Returns the number of milliseconds to sleep between runs of the idle object evictor thread.
StringgetValidationQuery()
The SQL query that will be used to validate connections from this pool before returning them to the caller.
booleanisDefaultAutoCommit()
Get the value of defaultAutoCommit, which defines the state of connections handed out from this pool.
booleanisDefaultReadOnly()
Get the value of defaultReadOnly, which defines the state of connections handed out from this pool.
booleanisRollbackAfterValidation()
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.
booleanisTestOnBorrow()
booleanisTestOnReturn()
booleanisTestWhileIdle()
voidsetConnectionPoolDataSource(ConnectionPoolDataSource v)
Set the backend ConnectionPoolDataSource.
voidsetMaxActive(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.
voidsetMaxIdle(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.
voidsetMaxWait(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.
voidsetMinEvictableIdleTimeMillis(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).
voidsetNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the number of objects to examine during each run of the idle object evictor thread (if any).
voidsetTestOnBorrow(boolean testOnBorrow)
When true, objects will be {*link PoolableObjectFactory#validateObject validated} before being returned by the {*link #borrowObject} method.
voidsetTestOnReturn(boolean testOnReturn)
When true, objects will be {*link PoolableObjectFactory#validateObject validated} before being returned to the pool within the {*link #returnObject}.
voidsetTestWhileIdle(boolean testWhileIdle)
When true, objects will be {*link PoolableObjectFactory#validateObject validated} by the idle object evictor (if any).
voidsetTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
Sets the number of milliseconds to sleep between runs of the idle object evictor thread.
voidsetValidationQuery(String validationQuery)
The SQL query that will be used to validate connections from this pool before returning them to the caller.