TransactionProvider SPI.
This implementation is entirely based on JDBC transactions and is intended to
work with DefaultConnectionProvider (which is implicitly created when
using DSL#using(Connection)).
Savepoints, if
supported by the underlying JDBC driver, and if nested() is
true. To deactivate nested transactions, use
DefaultTransactionProvider(ConnectionProvider, boolean).
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ConnectionProvider | |
| private static final Savepoint | IGNORED_SAVEPOINT
This |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultTransactionProvider(ConnectionProvider connectionProvider, boolean
Whether nested transactions via nested)Savepoints are
supported.
|
| Modifier and Type | Method and Description |
|---|---|
| private final boolean | |
| public final void | begin(TransactionContext
the configuration scoped to this transaction and its
nested transactions. ctx)Implements org. |
| private final void | brace(Configuration configuration, boolean start)
Ensure an |
| public final void | commit(TransactionContext
the configuration scoped to this transaction and its nested
transactions. ctx)Implements org. |
| private final DefaultConnectionProvider | |
| public final boolean | |
| pack-priv final int | |
| public final void | rollback(TransactionContext
the configuration scoped to this transaction and its nested
transactions. ctx)Implements org. |
| private final Deque | |
| private final Savepoint |
| connectionProvider | back to summary |
|---|---|
| private final ConnectionProvider connectionProvider | |
| IGNORED_SAVEPOINT | back to summary |
|---|---|
| private static final Savepoint IGNORED_SAVEPOINT This | |
| nested | back to summary |
|---|---|
| private final boolean nested | |
| DefaultTransactionProvider | back to summary |
|---|---|
| public DefaultTransactionProvider(ConnectionProvider connectionProvider) | |
| DefaultTransactionProvider | back to summary |
|---|---|
public DefaultTransactionProvider(ConnectionProvider connectionProvider, boolean nested)
| |
| autoCommit | back to summary |
|---|---|
| private final boolean autoCommit(Configuration configuration) | |
| begin | back to summary |
|---|---|
| public final void begin(TransactionContext ctx) Implements org. Doc from org. Begin a new transaction.
This method begins a new transaction with a
| |
| brace | back to summary |
|---|---|
| private final void brace(Configuration configuration, boolean start) Ensure an | |
| commit | back to summary |
|---|---|
| public final void commit(TransactionContext ctx) Implements org. Doc from org. Commit a transaction.
| |
| connection | back to summary |
|---|---|
| private final DefaultConnectionProvider connection(Configuration configuration) | |
| nested | back to summary |
|---|---|
| public final boolean nested() | |
| nestingLevel | back to summary |
|---|---|
| pack-priv final int nestingLevel(Configuration configuration) | |
| rollback | back to summary |
|---|---|
| public final void rollback(TransactionContext ctx) Implements org. Doc from org. Rollback a transaction.
| |
| savepoints | back to summary |
|---|---|
private final Deque
| |
| setSavepoint | back to summary |
|---|---|
| private final Savepoint setSavepoint(Configuration configuration, boolean topLevel) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | getSavepointId()
Implements java. Savepoint object represents.
|
| public String | getSavepointName()
Implements java. Savepoint
object represents.
|
| DefaultSavepoint | back to summary |
|---|---|
| private DefaultSavepoint() | |
| getSavepointId | back to summary |
|---|---|
| public int getSavepointId() throws SQLException Implements java. Doc from java. Retrieves the generated ID for the savepoint that this
| |
| getSavepointName | back to summary |
|---|---|
| public String getSavepointName() throws SQLException Implements java. Doc from java. Retrieves the name of the savepoint that this
| |