public final class FBStandAloneConnectionManager extends java.lang.Object implements XcaConnectionManager, XcaConnectionEventListener, java.io.Serializable
FBStandAloneConnectionManager
provides the default implementation of FirebirdConnectionManager for
standalone use. There is no pooling or other features.Modifier and Type | Method and Description |
---|---|
FirebirdConnection |
allocateConnection(FBManagedConnectionFactory mcf,
FBConnectionRequestInfo cxRequestInfo)
Allocates a new
FirebirdConnection backed by a FBManagedConnection from the specified factory. |
void |
connectionClosed(XcaConnectionEvent ce)
Notifies the close of a connection.
|
void |
connectionErrorOccurred(XcaConnectionEvent ce)
Notifies a connection related error.
|
public FirebirdConnection allocateConnection(FBManagedConnectionFactory mcf, FBConnectionRequestInfo cxRequestInfo) throws java.sql.SQLException
XcaConnectionManager
FirebirdConnection
backed by a FBManagedConnection
from the specified factory.
The returned connection should behave as a new connection, but may be backed by an already established (eg pooled) managed connection.
allocateConnection
in interface XcaConnectionManager
mcf
- Managed connection factorycxRequestInfo
- Specific connection request infoFirebirdConnection
instancejava.sql.SQLException
- for generic exceptionspublic void connectionClosed(XcaConnectionEvent ce)
XcaConnectionEventListener
A managed connection notifies its listeners by calling this method when an application component closes a connection handle. The owner of the managed connection can use this event to put the managed connection instance back in to the connection pool, or close the physical connection.
connectionClosed
in interface XcaConnectionEventListener
ce
- Connection eventpublic void connectionErrorOccurred(XcaConnectionEvent ce)
XcaConnectionEventListener
The managed connection instance calls this method to notify its listeners of the occurrence of a physical connection-related error. The event notification happens just before it throws an exception to the application component using the connection handle.
This method indicates that the associated managed connection instance is now invalid and unusable. The owner of the managed connection handles the connection error event notification by initiating owner-specific cleanup (for example, removing the managed connection instance from the connection pool) and then calling the destroy method to destroy the physical connection.
connectionErrorOccurred
in interface XcaConnectionEventListener
ce
- Connection eventCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.