Package org.hibernate.resource.jdbc.spi
Interface LogicalConnectionImplementor
-
- All Superinterfaces:
LogicalConnection
- All Known Implementing Classes:
AbstractLogicalConnectionImplementor,LogicalConnectionManagedImpl,LogicalConnectionProvidedImpl
public interface LogicalConnectionImplementor extends LogicalConnection
SPI contract forLogicalConnection.- See Also:
JdbcCoordinator.getLogicalConnection()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterStatement()Notification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENTreleasing if needed.voidafterTransaction()Notification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTIONreleasing if needed.voidbeforeTransactionCompletion()Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETIONis enabled.PhysicalConnectionHandlingModegetConnectionHandlingMode()ConnectiongetPhysicalConnection()Exposes access to the "real"Connection.PhysicalJdbcTransactiongetPhysicalJdbcTransaction()Access to the current underlying JDBC transaction.ConnectionmanualDisconnect()Manually disconnect the underlying JDBC Connection.voidmanualReconnect(Connection suppliedConnection)Manually reconnect the underlying JDBC Connection.voidserialize(ObjectOutputStream oos)Serialization hook.-
Methods inherited from interface org.hibernate.resource.jdbc.LogicalConnection
close, getResourceRegistry, isOpen, isPhysicallyConnected
-
-
-
-
Method Detail
-
getPhysicalConnection
Connection getPhysicalConnection()
Exposes access to the "real"Connection.- Returns:
- The connection
-
getConnectionHandlingMode
PhysicalConnectionHandlingMode getConnectionHandlingMode()
-
afterStatement
void afterStatement()
Notification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENTreleasing if needed.
-
beforeTransactionCompletion
void beforeTransactionCompletion()
Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETIONis enabled.
-
afterTransaction
void afterTransaction()
Notification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTIONreleasing if needed.
-
manualDisconnect
Connection manualDisconnect()
Manually disconnect the underlying JDBC Connection. The assumption here is that the manager will be reconnected at a later point in time.- Returns:
- The connection maintained here at time of disconnect.
nullif there was no connection cached internally.
-
manualReconnect
void manualReconnect(Connection suppliedConnection)
Manually reconnect the underlying JDBC Connection. Should be called at some point aftermanualDisconnect().- Parameters:
suppliedConnection- For user supplied connection strategy the user needs to hand us the connection with which to reconnect. It is an error to pass a connection in the other strategies.
-
getPhysicalJdbcTransaction
PhysicalJdbcTransaction getPhysicalJdbcTransaction()
Access to the current underlying JDBC transaction.
-
serialize
void serialize(ObjectOutputStream oos) throws IOException
Serialization hook.- Parameters:
oos- The stream to write out state to- Throws:
IOException- Problem accessing stream
-
-