Created
June 13, 2014 14:28
-
-
Save sebersole/b7a8f64a03c95cc8b90d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Defines the resource-level transaction capabilities of Hibernate, which revolves around the | |
* {@link org.hibernate.resource.transaction.TransactionCoordinator} contract. See | |
* {@link org.hibernate.resource.transaction.TransactionCoordinatorBuilder} and | |
* {@link org.hibernate.resource.transaction.TransactionCoordinatorBuilderFactory} | |
* for information on obtaining TransactionCoordinator instances. | |
* | |
* <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 | |
* {@link org.hibernate.Transaction}) as a means to control the underlying transaction. That | |
* control flows from the {@link org.hibernate.Transaction} into the TransactionCoordinator | |
* through the {@link org.hibernate.resource.transaction.TransactionCoordinator.LocalInflow} 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 {@link javax.transaction.UserTransaction} or | |
* {@link javax.transaction.Transaction}) | |
* </li> | |
* <li> | |
* a "JDBC transaction", as expressed through the JDBC {@link java.sql.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 {@link org.hibernate.Transaction#registerSynchronization} and | |
* {@link org.hibernate.resource.transaction.SynchronizationRegistry} for additional details. | |
*/ | |
package org.hibernate.resource.transaction; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment