Package net.sourceforge.jtds.jdbcx
Class PooledConnection
java.lang.Object
net.sourceforge.jtds.jdbcx.PooledConnection
- All Implemented Interfaces:
PooledConnection
- Direct Known Subclasses:
JtdsXAConnection
jTDS implementation of the
PooledConnection interface.- Version:
- $Id: PooledConnection.java,v 1.11.6.3 2009-12-30 08:45:34 ickzon Exp $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified listener to the list.voidvoidclose()Closes the database connection.voidfireConnectionEvent(boolean closed, SQLException sqlException) Fires a new connection event on all listeners.Returns a ConnectionProxy.voidRemoves the specified listener from the list.void
-
Field Details
-
listeners
-
connection
-
-
Constructor Details
-
PooledConnection
-
-
Method Details
-
addConnectionEventListener
Adds the specified listener to the list.- Specified by:
addConnectionEventListenerin interfacePooledConnection- See Also:
-
close
Closes the database connection.- Specified by:
closein interfacePooledConnection- Throws:
SQLException- if an error occurs
-
fireConnectionEvent
Fires a new connection event on all listeners.- Parameters:
closed-trueifclosehas been called on the connection;falseif thesqlExceptionrepresents an error where the connection may not longer be used.sqlException- the SQLException to pass to the listeners
-
getConnection
Returns a ConnectionProxy.- Specified by:
getConnectionin interfacePooledConnection- Throws:
SQLException- if an error occurs
-
removeConnectionEventListener
Removes the specified listener from the list.- Specified by:
removeConnectionEventListenerin interfacePooledConnection- See Also:
-
addStatementEventListener
- Specified by:
addStatementEventListenerin interfacePooledConnection
-
removeStatementEventListener
- Specified by:
removeStatementEventListenerin interfacePooledConnection
-