Package org.hibernate.resource.jdbc.spi
Interface JdbcSessionOwner
-
- All Known Subinterfaces:
EventSource
,SessionImplementor
,SharedSessionContractImplementor
- All Known Implementing Classes:
AbstractDelegateSessionImplementor
,AbstractSharedSessionContract
,SessionDelegatorBaseImpl
,SessionImpl
,SharedSessionDelegatorBaseImpl
,StatelessSessionImpl
,ToOneDelegateSessionImplementor
public interface JdbcSessionOwner
Contract for something that controls aJdbcSessionContext
.The term "JDBC session" is taken from the SQL specification which calls a connection and its associated transaction context a "session".
- API Note:
- The name comes from the design idea of a
JdbcSession
which encapsulates this information, which we will hopefully get back to later.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
afterTransactionBegin()
A after-begin callback from the coordinator to its owner.void
afterTransactionCompletion(boolean successful, boolean delayed)
An after-completion callback to the owner.void
beforeTransactionCompletion()
A before-completion callback to the owner.void
flushBeforeTransactionCompletion()
EventManager
getEventManager()
Integer
getJdbcBatchSize()
Get the Session-level JDBC batch size.JdbcConnectionAccess
getJdbcConnectionAccess()
JdbcSessionContext
getJdbcSessionContext()
default SqlExceptionHelper
getSqlExceptionHelper()
TransactionCoordinator
getTransactionCoordinator()
Obtain the builder for TransactionCoordinator instancesvoid
startTransactionBoundary()
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction
-
-
-
Method Detail
-
getJdbcSessionContext
JdbcSessionContext getJdbcSessionContext()
-
getJdbcConnectionAccess
JdbcConnectionAccess getJdbcConnectionAccess()
-
getTransactionCoordinator
TransactionCoordinator getTransactionCoordinator()
Obtain the builder for TransactionCoordinator instances- Returns:
- The TransactionCoordinatorBuilder
-
startTransactionBoundary
void startTransactionBoundary()
Callback indicating recognition of entering into a transactional context whether that is explicitly via the HibernateTransaction
API or via registration of Hibernate's JTA Synchronization impl with a JTA Transaction
-
afterTransactionBegin
void afterTransactionBegin()
A after-begin callback from the coordinator to its owner.
-
beforeTransactionCompletion
void beforeTransactionCompletion()
A before-completion callback to the owner.
-
afterTransactionCompletion
void afterTransactionCompletion(boolean successful, boolean delayed)
An after-completion callback to the owner.- Parameters:
successful
- Was the transaction successful?delayed
- Is this a delayed after transaction completion call (aka after a timeout)?
-
flushBeforeTransactionCompletion
void flushBeforeTransactionCompletion()
-
getJdbcBatchSize
Integer getJdbcBatchSize()
Get the Session-level JDBC batch size.- Returns:
- Session-level JDBC batch size
- Since:
- 5.2
-
getEventManager
EventManager getEventManager()
-
getSqlExceptionHelper
default SqlExceptionHelper getSqlExceptionHelper()
-
-