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: |
|
Extends: |
None |
Implements: |
|
Constructor
-
public ConnectionWrapper(Connection realConn,
DataSourceWrapper dsw);
Creates a new
ConnectionWrapper
around the specifiedConnection
, owned by the specifiedDataSourceWrapper
.
Methods
-
public void close( ) throws SQLException;
Informs the
DataSourceWrapper
that thisConnectionWrapper
is closed by calling itsreturnConnection( )
method.-
public boolean isClosed( ) throws SQLException;
Returns
true
if theclose( )
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.