| |
|
| java.lang.Object com.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
MysqlPooledConnection | public class MysqlPooledConnection implements PooledConnection(Code) | | This class is used to wrap and return a physical connection within a logical
handle. It also registers and notifies ConnectionEventListeners of any
ConnectionEvents
See Also: javax.sql.PooledConnection See Also: org.gjt.mm.mysql.jdbc2.optional.LogicalHandle author: Todd Wolff |
CONNECTION_CLOSED_EVENT | final public static int CONNECTION_CLOSED_EVENT(Code) | | The flag for a connection being closed.
|
CONNECTION_ERROR_EVENT | final public static int CONNECTION_ERROR_EVENT(Code) | | The flag for an exception being thrown.
|
MysqlPooledConnection | public MysqlPooledConnection(com.mysql.jdbc.Connection connection)(Code) | | Construct a new MysqlPooledConnection and set instance variables
Parameters: connection - physical connection to db |
addConnectionEventListener | public synchronized void addConnectionEventListener(ConnectionEventListener connectioneventlistener)(Code) | | Adds ConnectionEventListeners to a hash table to be used for notification
of ConnectionEvents
Parameters: connectioneventlistener - listener to be notified with ConnectionEvents |
callListener | protected synchronized void callListener(int eventType, SQLException sqlException)(Code) | | Notifies all registered ConnectionEventListeners of ConnectionEvents.
Instantiates a new ConnectionEvent which wraps sqlException and invokes
either connectionClose or connectionErrorOccurred on listener as
appropriate.
Parameters: eventType - value indicating whether connectionClosed orconnectionErrorOccurred called Parameters: sqlException - the exception being thrown |
close | public synchronized void close() throws SQLException(Code) | | Invoked by the container (not the client), and should close the physical
connection. This will be called if the pool is destroyed or the
connectionEventListener receives a connectionErrorOccurred event.
See Also: java.sql.DataSource.close |
getConnection | public synchronized Connection getConnection() throws SQLException(Code) | | Invoked by the container. Return a logicalHandle object that wraps a
physical connection.
See Also: java.sql.DataSource.getConnection |
removeConnectionEventListener | public synchronized void removeConnectionEventListener(ConnectionEventListener connectioneventlistener)(Code) | | Removes ConnectionEventListeners from hash table used for notification of
ConnectionEvents
Parameters: connectioneventlistener - listener to be removed |
|
|
|