An adapter for jdbc drivers that do not include an implementation of {@link javax.sql.ConnectionPoolDataSource}, but still include a {@link java.sql.DriverManager} implementation. ConnectionPoolDataSource
s are not used within general applications. They are used by DataSource
implementations that pool Connection
s, such as {@link org.apache.commons.dbcp.datasources.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.
The package documentation contains an example using catalina and JNDI. The datasources package documentation shows how to use DriverAdapterCPDS
as a source for Jdbc2PoolDataSource
without the use of JNDI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|