An adapter for jdbc drivers that do not include an implementation
of ConnectionPoolDataSource, but still include a
DriverManager implementation.
ConnectionPoolDataSources are not used within general
applications. They are used by DataSource implementations
that pool Connections, such as
SharedPoolDataSource. A J2EE
container will normally provide some method of initializing the
ConnectionPoolDataSource whose attributes are presented
as bean getters/setters and then deploying it via JNDI. It is then
available as a source of physical connections to the database, when
the pooling DataSource needs to create a new
physical connection.

Although normally used within a JNDI environment, the DriverAdapterCPDS
can be instantiated and initialized as any bean and then attached
directly to a pooling DataSource.
Jdbc2PoolDataSource can use the
ConnectionPoolDataSource with or without the use of JNDI.

The DriverAdapterCPDS also provides PreparedStatement pooling
which is not generally available in jbdc2
ConnectionPoolDataSource implementation, but is
addressed within the jdbc3 specification. The PreparedStatement
pool in DriverAdapterCPDS has been in the dbcp package for some time, but
it has not undergone extensive testing in the configuration used here.
It should be considered experimental and can be toggled with the
poolPreparedStatements attribute.

setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis)
Sets the minimum amount of time a statement 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 statements to examine during each run of the
idle object evictor thread (if any).

setTimeBetweenEvictionRunsMillis

Sets the number of milliseconds to sleep between runs of the
idle object evictor thread.
When non-positive, no idle object evictor thread will be
run.
*see #getTimeBetweenEvictionRunsMillis

getNumTestsPerEvictionRun

public int getNumTestsPerEvictionRun()

Returns the number of statements to examine during each run of the
idle object evictor thread (if any).
*see #setNumTestsPerEvictionRun
*see #setTimeBetweenEvictionRunsMillis

setNumTestsPerEvictionRun

public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)

Sets the number of statements 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. I.e., when the value is -n, roughly one nth of the
idle objects will be tested per run.
*see #getNumTestsPerEvictionRun
*see #setTimeBetweenEvictionRunsMillis

getMinEvictableIdleTimeMillis

public int getMinEvictableIdleTimeMillis()

Returns the minimum amount of time a statement may sit idle in the pool
before it is eligible for eviction by the idle object evictor
(if any).
*see #setMinEvictableIdleTimeMillis
*see #setTimeBetweenEvictionRunsMillis

setMinEvictableIdleTimeMillis

Sets the minimum amount of time a statement may sit idle in the pool
before it is eligable for eviction by the idle object evictor
(if any).
When non-positive, no objects will be evicted from the pool
due to idle time alone.
*see #getMinEvictableIdleTimeMillis
*see #setTimeBetweenEvictionRunsMillis