Name

ConnectionWrapper

Synopsis

This class is a wrapper around a Connection, with a close( ) method that just informs its DataSourceWrapper it’s available for reuse again, and an isClosed( ) method to return the state of the wrapper instead of the wrapped Connection. All other methods just relay the call to the wrapped Connection.

Synopsis

Class name:

com.ora.jsp.sql.ConnectionWrapper

Extends:

None

Implements:

java.sql.Connection

Constructor

public ConnectionWrapper(Connection realConn, DataSourceWrapper dsw);

Creates a new ConnectionWrapper around the specified Connection, owned by the specified DataSourceWrapper.

Methods

public void close( ) throws SQLException;

Informs the DataSourceWrapper that this ConnectionWrapper is closed by calling its returnConnection( ) method.

public boolean isClosed( ) throws SQLException;

Returns true if the close( ) method has been called, false otherwise.

All wrapped methods simply call the corresponding method on the wrapped Connection. See the Java documentation at http://java.sun.com/docs/index.html for details about these methods.

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.