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 void
void
Notification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENT
releasing if needed.void
Notification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTION
releasing if needed.void
Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION
is enabled.void
begin()
Begin the resource transactionvoid
commit()
Commit the resource transactionprotected static boolean
determineInitialAutoCommitMode
(Connection providedConnection) protected boolean
protected void
protected abstract Connection
Access to the current underlying JDBC transaction.Provides access to the registry of JDBC resources associated with this logical connection.protected void
resetConnection
(boolean initiallyAutoCommit) void
rollback()
Rollback the resource transactionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.resource.jdbc.LogicalConnection
close, isOpen, isPhysicallyConnected
Methods 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:LogicalConnectionImplementor
Access to the current underlying JDBC transaction.- Specified by:
getPhysicalJdbcTransaction
in interfaceLogicalConnectionImplementor
-
errorIfClosed
protected void errorIfClosed() -
getResourceRegistry
Description copied from interface:LogicalConnection
Provides access to the registry of JDBC resources associated with this logical connection.- Specified by:
getResourceRegistry
in interfaceLogicalConnection
- Returns:
- The JDBC resource registry.
-
afterStatement
public void afterStatement()Description copied from interface:LogicalConnectionImplementor
Notification indicating a JDBC statement has been executed, to triggerConnectionReleaseMode.AFTER_STATEMENT
releasing if needed.- Specified by:
afterStatement
in interfaceLogicalConnectionImplementor
-
beforeTransactionCompletion
public void beforeTransactionCompletion()Description copied from interface:LogicalConnectionImplementor
Notification indicating a transaction is about to be completed, to trigger release of the JDBC connection if needed, that is, ifConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION
is enabled.- Specified by:
beforeTransactionCompletion
in interfaceLogicalConnectionImplementor
-
afterTransaction
public void afterTransaction()Description copied from interface:LogicalConnectionImplementor
Notification indicating a transaction has just completed, to triggerConnectionReleaseMode.AFTER_TRANSACTION
releasing if needed.- Specified by:
afterTransaction
in interfaceLogicalConnectionImplementor
-
getConnectionForTransactionManagement
-
begin
public void begin()Description copied from interface:JdbcResourceTransaction
Begin the resource transaction- Specified by:
begin
in interfaceJdbcResourceTransaction
-
commit
public void commit()Description copied from interface:JdbcResourceTransaction
Commit the resource transaction- Specified by:
commit
in interfaceJdbcResourceTransaction
-
afterCompletion
protected void afterCompletion() -
resetConnection
protected void resetConnection(boolean initiallyAutoCommit) -
rollback
public void rollback()Description copied from interface:JdbcResourceTransaction
Rollback the resource transaction- Specified by:
rollback
in interfaceJdbcResourceTransaction
-
determineInitialAutoCommitMode
-
getStatus
- Specified by:
getStatus
in interfaceJdbcResourceTransaction
-
doConnectionsFromProviderHaveAutoCommitDisabled
protected boolean doConnectionsFromProviderHaveAutoCommitDisabled()
-