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
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceRegistry
resourceRegistry
-
Constructor Summary
Constructors Constructor Description AbstractLogicalConnectionImplementor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
afterCompletion()
void
afterStatement()
Notification indicating a JDBC statement has been executed to triggerConnectionReleaseMode.AFTER_STATEMENT
releasing if neededvoid
afterTransaction()
Notification indicating a transaction has completed to triggerConnectionReleaseMode.AFTER_TRANSACTION
releasing if neededvoid
beforeTransactionCompletion()
Notification indicating a transaction is about to be completed, so to trigger releasing of the connection if needed (ConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION
is enabled)void
begin()
Begin the resource transactionvoid
commit()
Commit the resource transactionprotected static boolean
determineInitialAutoCommitMode(Connection providedConnection)
protected boolean
doConnectionsFromProviderHaveAutoCommitDisabled()
protected void
errorIfClosed()
protected abstract Connection
getConnectionForTransactionManagement()
PhysicalJdbcTransaction
getPhysicalJdbcTransaction()
Access to the current underlying JDBC transactionResourceRegistry
getResourceRegistry()
Provides access to the registry of JDBC resources associated with this LogicalConnection.TransactionStatus
getStatus()
protected void
resetConnection(boolean initiallyAutoCommit)
void
rollback()
Rollback the resource transaction-
Methods 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 Detail
-
resourceRegistry
protected ResourceRegistry resourceRegistry
-
-
Method Detail
-
getPhysicalJdbcTransaction
public PhysicalJdbcTransaction getPhysicalJdbcTransaction()
Description copied from interface:LogicalConnectionImplementor
Access to the current underlying JDBC transaction- Specified by:
getPhysicalJdbcTransaction
in interfaceLogicalConnectionImplementor
-
errorIfClosed
protected void errorIfClosed()
-
getResourceRegistry
public ResourceRegistry getResourceRegistry()
Description copied from interface:LogicalConnection
Provides access to the registry of JDBC resources associated with this LogicalConnection.- 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, so to trigger releasing of the connection if needed (ConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION
is enabled)- Specified by:
beforeTransactionCompletion
in interfaceLogicalConnectionImplementor
-
afterTransaction
public void afterTransaction()
Description copied from interface:LogicalConnectionImplementor
Notification indicating a transaction has completed to triggerConnectionReleaseMode.AFTER_TRANSACTION
releasing if needed- Specified by:
afterTransaction
in interfaceLogicalConnectionImplementor
-
getConnectionForTransactionManagement
protected abstract Connection 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
protected static boolean determineInitialAutoCommitMode(Connection providedConnection)
-
getStatus
public TransactionStatus getStatus()
- Specified by:
getStatus
in interfaceJdbcResourceTransaction
-
doConnectionsFromProviderHaveAutoCommitDisabled
protected boolean doConnectionsFromProviderHaveAutoCommitDisabled()
-
-