Defines the resource-level transaction capabilities of Hibernate, which revolves around the
TransactionCoordinatorcontract. TransactionCoordinator instances can be obtained from
TransactionCoordinatorBuilder, which is a Service and available from the StandardServiceRegistry A few terms/concepts to keep in mind here...
Local transactionThe local transaction is the idea of transactionality exposed to the application (as
Transaction) as a means to control the underlying transaction. That control flows from the
Transactioninto the TransactionCoordinator through the
Physical transactionThis is the physical underlying transaction that ultimately controls the database transaction. This can be:
a JTA transaction, as expressed by
a "JDBC transaction", as expressed through the JDBC
Local SynchronizationThe Hibernate transaction api allows the application itself to register JTA Synchronization objects with the TransactionCoordinator. These local Synchronizations work in all transaction environments. See
SynchronizationRegistryfor additional details.
Exception Summary Exception Description LocalSynchronizationExceptionWraps an exception thrown from a "local synchronization" (one registered in the SynchronizationRegistry). NullSynchronizationExceptionIndicates an attempt to register a null synchronization. TransactionRequiredForJoinExceptionIndicates a call to
TransactionCoordinator.explicitJoin()that requires an active transaction where there currently is none.