net.sourceforge.jtds.jdbcx
Class PooledConnection
java.lang.Object
net.sourceforge.jtds.jdbcx.PooledConnection
- javax.sql.PooledConnection
public class PooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection
jTDS implementation of the PooledConnection
interface.
$Id: PooledConnection.java,v 1.11 2005/02/01 23:52:50 alin_sinpalean Exp $
connection
protected Connection connection
listeners
private ArrayList listeners
PooledConnection
public PooledConnection(Connection connection)
addConnectionEventListener
public void addConnectionEventListener(ConnectionEventListener listener)
Adds the specified listener to the list.
close
public void close()
throws SQLException
Closes the database connection.
fireConnectionEvent
public void fireConnectionEvent(boolean closed,
SQLException sqlException)
Fires a new connection event on all listeners.
closed
- true
if close
has been called on the
connection; false
if the sqlException
represents
an error where the connection may not longer be used.sqlException
- the SQLException to pass to the listeners
getConnection
public Connection getConnection()
throws SQLException
Returns a ConnectionProxy.
removeConnectionEventListener
public void removeConnectionEventListener(ConnectionEventListener listener)
Removes the specified listener from the list.
Generated on September 18 2009