org.jboss.minerva.jdbc
Interface ConnectionWrapper

All Superinterfaces:
java.sql.Connection
All Known Implementing Classes:
ConnectionInPool, XAClientConnection

public interface ConnectionWrapper
extends java.sql.Connection

Wrapper for database connections. Tracks open statements, last used time, and records errors. In practice, this is used both as a wrapper for connections in a pool and as a wrapper for connections handed out by an XAConnection.

Version:
$Revision: 1.1 $
Author:
Aaron Mulder (ammulder@alumni.princeton.edu)
See Also:
XAConnection

Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Method Summary
 void setError(java.sql.SQLException e)
          Indicates to the connection that an error occured.
 void setLastUsed()
          Sets the time this connection (or a statement or result set derived from it) was used.
 void statementClosed(java.sql.Statement st)
          Indicates that a statement derived from this connection was closed.
 
Methods inherited from interface java.sql.Connection
clearWarnings, close, commit, createStatement, createStatement, getAutoCommit, getCatalog, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareStatement, prepareStatement, rollback, setAutoCommit, setCatalog, setReadOnly, setTransactionIsolation, setTypeMap
 

Method Detail

setLastUsed

public void setLastUsed()
Sets the time this connection (or a statement or result set derived from it) was used.

setError

public void setError(java.sql.SQLException e)
Indicates to the connection that an error occured. This is typically used by statements and result sets derived from this connection.

statementClosed

public void statementClosed(java.sql.Statement st)
Indicates that a statement derived from this connection was closed. Statements are tracked so that any open statements can be closed when the connection is closed (or reused in a pool).


Copyright © 2000 The jBoss Organization. All Rights Reserved.