Name

DataSourceWrapper

Synopsis

This class is a wrapper implementing the JDBC 2.0 SE DataSource interface, used to make the ConnectionPool class look like a JDBC 2.0 DataSource. It can easily be modified to be used as a wrapper for any JDBC 1.0 connection pool implementation.

Synopsis

Class Name:

com.ora.jsp.sql.DataSourceWrapper

Extends:

None

Implements:

javax.sql.DataSource

Methods

public java.sql.Connection getConnection( ) throws java.sql.SQLException

Returns a ConnectionWrapper from the pool.

public void returnConnection(java.sql.Connection conn)

Used by the ConnectionWrapper to return a Connection to the pool when the client calls close( ).

public void setDriverClassName(String driverClassName)

Sets the driver class to be used for the data source.

public void setInitialConnections(int initialConnections)

Sets the initial connections to be created by the data source.

public void setPassword(String password)

Sets the database user password to be used for the data source.

public void setUrl(String url)

Sets the JDBC URL to be used for the data source.

public void setUser(String user)

Sets the database user to be used for the data source.

Get JavaServer Pages, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.