java.lang.Object
org.jooq.impl.ThreadLocalTransactionProvider
- All Implemented Interfaces:
- TransactionProvider
A 
TransactionProvider that implements thread-bound transaction
 semantics.
 
 Use this TransactionProvider if your transactions are
 thread-bound, meaning that a transaction and its underlying
 Connection will never leave the thread that started the transaction.
 
 When this TransactionProvider is used, users must pass their
 custom ConnectionProvider implementations to this
 TransactionProvider, instead of passing it to the
 Configuration.
- Author:
- Lukas Eder
- 
Constructor SummaryConstructorsConstructorDescriptionThreadLocalTransactionProvider(ConnectionProvider connectionProvider) ThreadLocalTransactionProvider(ConnectionProvider connectionProvider, boolean nested) ThreadLocalTransactionProvider(ConnectionProvider connectionProvider, boolean nested, TransactionProperty... properties) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidbegin(TransactionContext ctx) Begin a new transaction.voidcommit(TransactionContext ctx) Commit a transaction.final Set<TransactionProperty> Specify the transaction properties for transactions created by this provider.voidRollback a transaction.
- 
Constructor Details- 
ThreadLocalTransactionProvider
- 
ThreadLocalTransactionProvider- Parameters:
- nested- Whether nested transactions via- Savepoints are supported.
 
- 
ThreadLocalTransactionProviderpublic ThreadLocalTransactionProvider(ConnectionProvider connectionProvider, boolean nested, TransactionProperty... properties) - Parameters:
- nested- Whether nested transactions via- Savepoints are supported.
- properties- The default transaction properties that are used to create transactions from this provider.
 
 
- 
- 
Method Details- 
propertiesDescription copied from interface:TransactionProviderSpecify the transaction properties for transactions created by this provider.- Specified by:
- propertiesin interface- TransactionProvider
 
- 
beginDescription copied from interface:TransactionProviderBegin a new transaction.This method begins a new transaction with a Configurationscoped for this transaction. The resultingTransactionobject may be used by implementors to identify the transaction whenTransactionProvider.commit(TransactionContext)orTransactionProvider.rollback(TransactionContext)is called.- Specified by:
- beginin interface- TransactionProvider
- Parameters:
- ctx- the configuration scoped to this transaction and its nested transactions.
 
- 
commitDescription copied from interface:TransactionProviderCommit a transaction.- Specified by:
- commitin interface- TransactionProvider
- Parameters:
- ctx- the configuration scoped to this transaction and its nested transactions.
 
- 
rollbackDescription copied from interface:TransactionProviderRollback a transaction.- Specified by:
- rollbackin interface- TransactionProvider
- Parameters:
- ctx- the configuration scoped to this transaction and its nested transactions.
 
 
-