Class AbstractLogicalConnectionImplementor
java.lang.Object
org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor
- All Implemented Interfaces:
LogicalConnection,LogicalConnectionImplementor,PhysicalJdbcTransaction,JdbcResourceTransaction
- Direct Known Subclasses:
LogicalConnectionManagedImpl,LogicalConnectionProvidedImpl
public abstract class AbstractLogicalConnectionImplementor
extends Object
implements LogicalConnectionImplementor, PhysicalJdbcTransaction
Base support for
LogicalConnection implementations-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidNotification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENTreleasing if needed.voidNotification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTIONreleasing if needed.voidNotification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETIONis enabled.voidbegin()Begin the resource transactionvoidcommit()Commit the resource transactionprotected static booleandetermineInitialAutoCommitMode(Connection providedConnection) protected booleanprotected voidprotected abstract ConnectionAccess to the current underlying JDBC transaction.Provides access to the registry of JDBC resources associated with this logical connection.protected voidresetConnection(boolean initiallyAutoCommit) voidrollback()Rollback the resource transactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.resource.jdbc.LogicalConnection
close, isOpen, isPhysicallyConnectedMethods inherited from interface org.hibernate.resource.jdbc.spi.LogicalConnectionImplementor
getConnectionHandlingMode, getPhysicalConnection, manualDisconnect, manualReconnect, serialize
-
Field Details
-
resourceRegistry
-
-
Constructor Details
-
AbstractLogicalConnectionImplementor
public AbstractLogicalConnectionImplementor()
-
-
Method Details
-
getPhysicalJdbcTransaction
Description copied from interface:LogicalConnectionImplementorAccess to the current underlying JDBC transaction.- Specified by:
getPhysicalJdbcTransactionin interfaceLogicalConnectionImplementor
-
errorIfClosed
protected void errorIfClosed() -
getResourceRegistry
Description copied from interface:LogicalConnectionProvides access to the registry of JDBC resources associated with this logical connection.- Specified by:
getResourceRegistryin interfaceLogicalConnection- Returns:
- The JDBC resource registry.
-
afterStatement
public void afterStatement()Description copied from interface:LogicalConnectionImplementorNotification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENTreleasing if needed.- Specified by:
afterStatementin interfaceLogicalConnectionImplementor
-
beforeTransactionCompletion
public void beforeTransactionCompletion()Description copied from interface:LogicalConnectionImplementorNotification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETIONis enabled.- Specified by:
beforeTransactionCompletionin interfaceLogicalConnectionImplementor
-
afterTransaction
public void afterTransaction()Description copied from interface:LogicalConnectionImplementorNotification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTIONreleasing if needed.- Specified by:
afterTransactionin interfaceLogicalConnectionImplementor
-
getConnectionForTransactionManagement
-
begin
public void begin()Description copied from interface:JdbcResourceTransactionBegin the resource transaction- Specified by:
beginin interfaceJdbcResourceTransaction
-
commit
public void commit()Description copied from interface:JdbcResourceTransactionCommit the resource transaction- Specified by:
commitin interfaceJdbcResourceTransaction
-
afterCompletion
protected void afterCompletion() -
resetConnection
protected void resetConnection(boolean initiallyAutoCommit) -
rollback
public void rollback()Description copied from interface:JdbcResourceTransactionRollback the resource transaction- Specified by:
rollbackin interfaceJdbcResourceTransaction
-
determineInitialAutoCommitMode
-
getStatus
- Specified by:
getStatusin interfaceJdbcResourceTransaction
-
doConnectionsFromProviderHaveAutoCommitDisabled
protected boolean doConnectionsFromProviderHaveAutoCommitDisabled()
-