Package org.firebirdsql.ds
Class FBPooledConnection
java.lang.Object
org.firebirdsql.ds.FBPooledConnection
- All Implemented Interfaces:
PooledConnection
- Direct Known Subclasses:
FBXAConnection
PooledConnection implementation for
FBConnectionPoolDataSource- Since:
- 2.2
- Author:
- Mark Rotteveel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidclose()protected org.firebirdsql.ds.PooledConnectionHandlercreateConnectionHandler(Connection connection) Creates the PooledConnectionHandler for the connection.protected voidHelper method to fire the connectionClosed event.protected voidHelper method to fire the connectionErrorOccurred event.protected voidHelper method to fire the connectionErrorOccurred event.protected voidreleaseConnectionHandler(org.firebirdsql.ds.PooledConnectionHandler pch) Releases the current handler if it is equal to the handler passed inpch.voidvoidprotected voidresetConnection(Connection connection)
-
Constructor Details
-
FBPooledConnection
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfacePooledConnection- Throws:
SQLException
-
resetConnection
- Throws:
SQLException
-
createConnectionHandler
Creates the PooledConnectionHandler for the connection.Subclasses may override this method to return their own subclass of PooledConnectionHandler.
- Parameters:
connection- Connection- Returns:
- PooledConnectionHandler
-
close
- Specified by:
closein interfacePooledConnection- Throws:
SQLException
-
fireFatalConnectionError
Helper method to fire the connectionErrorOccurred event. To be used with fatal (connection) errors only.- Parameters:
ex- The exception
-
fireConnectionError
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
-
fireConnectionClosed
protected void fireConnectionClosed()Helper method to fire the connectionClosed event. -
releaseConnectionHandler
protected 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.
-
addConnectionEventListener
- Specified by:
addConnectionEventListenerin interfacePooledConnection
-
removeConnectionEventListener
- Specified by:
removeConnectionEventListenerin interfacePooledConnection
-
addStatementEventListener
- Specified by:
addStatementEventListenerin interfacePooledConnection
-
removeStatementEventListener
- Specified by:
removeStatementEventListenerin interfacePooledConnection
-