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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final DefaultTransactionProvider | |
| pack-priv final ThreadLocal | |
| pack-priv final ThreadLocalTransactionProvider. | |
| pack-priv final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ThreadLocalTransactionProvider(ConnectionProvider connectionProvider, boolean
Whether nested transactions via nested)Savepoints are
supported.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | begin(TransactionContext
the configuration scoped to this transaction and its
nested transactions. ctx)Implements org. |
| public void | commit(TransactionContext
the configuration scoped to this transaction and its nested
transactions. ctx)Implements org. |
| pack-priv Configuration | |
| private Deque | |
| public void | rollback(TransactionContext
the configuration scoped to this transaction and its nested
transactions. ctx)Implements org. |
| delegateTransactionProvider | back to summary |
|---|---|
| pack-priv final DefaultTransactionProvider delegateTransactionProvider | |
| localConfigurations | back to summary |
|---|---|
| pack-priv final ThreadLocal<Deque<Configuration>> localConfigurations | |
| localConnectionProvider | back to summary |
|---|---|
| pack-priv final ThreadLocalTransactionProvider. | |
| localTxConnection | back to summary |
|---|---|
| pack-priv final ThreadLocal<Connection> localTxConnection | |
| ThreadLocalTransactionProvider | back to summary |
|---|---|
| public ThreadLocalTransactionProvider(ConnectionProvider connectionProvider) | |
| ThreadLocalTransactionProvider | back to summary |
|---|---|
public ThreadLocalTransactionProvider(ConnectionProvider connectionProvider, boolean nested)
| |
| begin | back to summary |
|---|---|
| public void begin(TransactionContext ctx) Implements org. Doc from org. Begin a new transaction.
This method begins a new transaction with a
| |
| commit | back to summary |
|---|---|
| public void commit(TransactionContext ctx) Implements org. Doc from org. Commit a transaction.
| |
| configuration | back to summary |
|---|---|
| pack-priv Configuration configuration(Configuration fallback) | |
| configurations | back to summary |
|---|---|
| private Deque | |
| rollback | back to summary |
|---|---|
| public void rollback(TransactionContext ctx) Implements org. Doc from org. Rollback a transaction.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ConnectionProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Connection | acquire()
Implements org. |
| public final void | release(Connection
A connection that was previously obtained from
connection)acquire(). This is never null.Implements org. |
| delegateConnectionProvider | back to summary |
|---|---|
| pack-priv final ConnectionProvider delegateConnectionProvider | |
| ThreadLocalConnectionProvider | back to summary |
|---|---|
| public ThreadLocalConnectionProvider(ConnectionProvider delegate) | |
| acquire | back to summary |
|---|---|
| public final Connection acquire() Implements org. Doc from org. Acquire a connection from the connection lifecycle handler.
This method is called by jOOQ exactly once per execution lifecycle, i.e.
per
jOOQ will guarantee that every acquired connection is released through
| |
| release | back to summary |
|---|---|
| public final void release(Connection connection) Implements org. Doc from org. Release a connection to the connection lifecycle handler. jOOQ will guarantee that every acquired connection is released exactly once.
| |