public class FBPooledConnection
extends java.lang.Object
implements javax.sql.PooledConnection
FBConnectionPoolDataSource
Modifier | Constructor and Description |
---|---|
protected |
FBPooledConnection(java.sql.Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionEventListener(javax.sql.ConnectionEventListener listener) |
void |
addStatementEventListener(javax.sql.StatementEventListener listener) |
void |
close() |
protected org.firebirdsql.ds.PooledConnectionHandler |
createConnectionHandler(java.sql.Connection connection)
Creates the PooledConnectionHandler for the connection.
|
protected void |
fireConnectionClosed()
Helper method to fire the connectionClosed event.
|
protected void |
fireConnectionError(java.sql.SQLException ex)
Helper method to fire the connectionErrorOccurred event.
|
protected void |
fireFatalConnectionError(java.sql.SQLException ex)
Helper method to fire the connectionErrorOccurred event.
|
java.sql.Connection |
getConnection() |
protected void |
releaseConnectionHandler(org.firebirdsql.ds.PooledConnectionHandler pch)
Releases the current handler if it is equal to the handler passed in
pch . |
void |
removeConnectionEventListener(javax.sql.ConnectionEventListener listener) |
void |
removeStatementEventListener(javax.sql.StatementEventListener listener) |
protected void |
resetConnection(java.sql.Connection connection) |
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.PooledConnection
java.sql.SQLException
protected void resetConnection(java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
protected org.firebirdsql.ds.PooledConnectionHandler createConnectionHandler(java.sql.Connection connection)
Subclasses may override this method to return their own subclass of PooledConnectionHandler.
connection
- Connectionpublic void close() throws java.sql.SQLException
close
in interface javax.sql.PooledConnection
java.sql.SQLException
protected void fireFatalConnectionError(java.sql.SQLException ex)
ex
- The exceptionprotected void fireConnectionError(java.sql.SQLException ex)
This method will decide which errors warrant a connectionErrorOccurred event to be reported or not.
ex
- The exceptionprotected void fireConnectionClosed()
protected void releaseConnectionHandler(org.firebirdsql.ds.PooledConnectionHandler pch)
pch
.
To be called by the PooledConnectionHandler when it has been closed.
pch
- PooledConnectionHandler to release.public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.sql.PooledConnection
public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.sql.PooledConnection
public void addStatementEventListener(javax.sql.StatementEventListener listener)
addStatementEventListener
in interface javax.sql.PooledConnection
public void removeStatementEventListener(javax.sql.StatementEventListener listener)
removeStatementEventListener
in interface javax.sql.PooledConnection
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.