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 TypeMethodDescriptionvoid
Adds the specified listener to the list.void
void
close()
Closes the database connection.void
fireConnectionEvent
(boolean closed, SQLException sqlException) Fires a new connection event on all listeners.Returns a ConnectionProxy.void
Removes 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:
addConnectionEventListener
in interfacePooledConnection
- See Also:
-
close
Closes the database connection.- Specified by:
close
in interfacePooledConnection
- Throws:
SQLException
- if an error occurs
-
fireConnectionEvent
Fires a new connection event on all listeners.- Parameters:
closed
-true
ifclose
has been called on the connection;false
if thesqlException
represents an error where the connection may not longer be used.sqlException
- the SQLException to pass to the listeners
-
getConnection
Returns a ConnectionProxy.- Specified by:
getConnection
in interfacePooledConnection
- Throws:
SQLException
- if an error occurs
-
removeConnectionEventListener
Removes the specified listener from the list.- Specified by:
removeConnectionEventListener
in interfacePooledConnection
- See Also:
-
addStatementEventListener
- Specified by:
addStatementEventListener
in interfacePooledConnection
-
removeStatementEventListener
- Specified by:
removeStatementEventListener
in interfacePooledConnection
-