Top Description Classes
[default module]

Package org.hibernate.resource.transaction


Defines the resource-level transaction capabilities of Hibernate, which revolves around the org.hibernate.resource.transaction.spi.TransactionCoordinator contract.

TransactionCoordinator instances can be obtained from org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder, which is a Service and available from the StandardServiceRegistry

A few terms/concepts to keep in mind here...

Local transaction

The local transaction is the idea of transactionality exposed to the application (as org.hibernate.Transaction) as a means to control the underlying transaction. That control flows from the org.hibernate.Transaction into the TransactionCoordinator through the org.hibernate.resource.transaction.spi.TransactionCoordinator.TransactionDriver it exposes.

Physical transaction

This is the physical underlying transaction that ultimately controls the database transaction. This can be: The corresponding concrete TransactionCoordinator implementations manage that bridging internally.

Local Synchronization

The Hibernate transaction api allows the application itself to register JTA Synchronization objects with the TransactionCoordinator. These local Synchronizations work in all transaction environments. See org.hibernate.Transaction#registerSynchronization and org.hibernate.resource.transaction.spi.SynchronizationRegistry for additional details.

Class Summary

Modifier and TypeClass and Description
public class
LocalSynchronizationException

Wraps an exception thrown from a "local synchronization" (one registered in the SynchronizationRegistry).

public class
NullSynchronizationException

Indicates an attempt to register a null synchronization.

public class
TransactionRequiredForJoinException

Indicates a call to TransactionCoordinator#explicitJoin() that requires an active transaction where there currently is none.