Package org.firebirdsql.ds
Class FBPooledConnection
- java.lang.Object
- 
- org.firebirdsql.ds.FBPooledConnection
 
- 
- All Implemented Interfaces:
- javax.sql.PooledConnection
 - Direct Known Subclasses:
- FBXAConnection
 
 public class FBPooledConnection extends java.lang.Object implements javax.sql.PooledConnectionPooledConnection implementation forFBConnectionPoolDataSource- Since:
- 2.2
- Author:
- Mark Rotteveel
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedFBPooledConnection(java.sql.Connection connection)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectionEventListener(javax.sql.ConnectionEventListener listener)voidaddStatementEventListener(javax.sql.StatementEventListener listener)voidclose()protected org.firebirdsql.ds.PooledConnectionHandlercreateConnectionHandler(java.sql.Connection connection)Creates the PooledConnectionHandler for the connection.protected voidfireConnectionClosed()Helper method to fire the connectionClosed event.protected voidfireConnectionError(java.sql.SQLException ex)Helper method to fire the connectionErrorOccurred event.protected voidfireFatalConnectionError(java.sql.SQLException ex)Helper method to fire the connectionErrorOccurred event.java.sql.ConnectiongetConnection()protected voidreleaseConnectionHandler(org.firebirdsql.ds.PooledConnectionHandler pch)Releases the current handler if it is equal to the handler passed inpch.voidremoveConnectionEventListener(javax.sql.ConnectionEventListener listener)voidremoveStatementEventListener(javax.sql.StatementEventListener listener)protected voidresetConnection(java.sql.Connection connection)protected LockCloseablewithLock()
 
- 
- 
- 
Method Detail- 
withLockprotected LockCloseable withLock() 
 - 
getConnectionpublic java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
- getConnectionin interface- javax.sql.PooledConnection
- Throws:
- java.sql.SQLException
 
 - 
resetConnectionprotected void resetConnection(java.sql.Connection connection) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
createConnectionHandlerprotected org.firebirdsql.ds.PooledConnectionHandler createConnectionHandler(java.sql.Connection connection) Creates the PooledConnectionHandler for the connection.Subclasses may override this method to return their own subclass of PooledConnectionHandler. - Parameters:
- connection- Connection
- Returns:
- PooledConnectionHandler
 
 - 
closepublic void close() throws java.sql.SQLException- Specified by:
- closein interface- javax.sql.PooledConnection
- Throws:
- java.sql.SQLException
 
 - 
fireFatalConnectionErrorprotected void fireFatalConnectionError(java.sql.SQLException ex) Helper method to fire the connectionErrorOccurred event. To be used with fatal (connection) errors only.- Parameters:
- ex- The exception
 
 - 
fireConnectionErrorprotected void fireConnectionError(java.sql.SQLException ex) Helper method to fire the connectionErrorOccurred event.This method will decide which errors warrant a connectionErrorOccurred event to be reported or not. - Parameters:
- ex- The exception
 
 - 
fireConnectionClosedprotected void fireConnectionClosed() Helper method to fire the connectionClosed event.
 - 
releaseConnectionHandlerprotected void releaseConnectionHandler(org.firebirdsql.ds.PooledConnectionHandler pch) Releases the current handler if it is equal to the handler passed inpch.To be called by the PooledConnectionHandler when it has been closed. - Parameters:
- pch- PooledConnectionHandler to release.
 
 - 
addConnectionEventListenerpublic void addConnectionEventListener(javax.sql.ConnectionEventListener listener) - Specified by:
- addConnectionEventListenerin interface- javax.sql.PooledConnection
 
 - 
removeConnectionEventListenerpublic void removeConnectionEventListener(javax.sql.ConnectionEventListener listener) - Specified by:
- removeConnectionEventListenerin interface- javax.sql.PooledConnection
 
 - 
addStatementEventListenerpublic void addStatementEventListener(javax.sql.StatementEventListener listener) - Specified by:
- addStatementEventListenerin interface- javax.sql.PooledConnection
 
 - 
removeStatementEventListenerpublic void removeStatementEventListener(javax.sql.StatementEventListener listener) - Specified by:
- removeStatementEventListenerin interface- javax.sql.PooledConnection
 
 
- 
 
-