Skip navigation links

Package org.hibernate.resource.transaction

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

See: Description

Package org.hibernate.resource.transaction Description

Defines the resource-level transaction capabilities of Hibernate, which revolves around the TransactionCoordinator contract. <p/> TransactionCoordinator instances can be obtained from TransactionCoordinatorBuilder, which is a Service and available from the StandardServiceRegistry <p/> A few terms/concepts to keep in mind here…​

<h2>Local transaction</h2>

The 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 Transaction into the TransactionCoordinator through the TransactionCoordinator.TransactionDriver it exposes.

<h2>Physical transaction</h2>

This is the physical underlying transaction that ultimately controls the database transaction. This can be:<ul> <li> a JTA transaction, as expressed by UserTransaction or Transaction) </li> <li> a "JDBC transaction", as expressed through the JDBC Connection object </li> </ul>

The corresponding concrete TransactionCoordinator implementations manage that bridging internally.

<h2>Local Synchronization</h2>

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 Transaction.registerSynchronization(javax.transaction.Synchronization) and SynchronizationRegistry for additional details.

Skip navigation links

Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.