TransactionOperations implementation which executes a given
TransactionCallback without an actual transaction.
TransactionOperations#withoutTransaction()
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final WithoutTransactionOperations |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public <T> T | execute(TransactionCallback<T>
the callback object that specifies the transactional action action)Implements org. |
| public void | executeWithoutResult(Consumer<TransactionStatus>
the Runnable that specifies the transactional action action)Overrides default org. Runnable within a transaction.
|
| INSTANCE | back to summary |
|---|---|
| pack-priv static final WithoutTransactionOperations INSTANCE | |
| WithoutTransactionOperations | back to summary |
|---|---|
| private WithoutTransactionOperations() | |
| execute | back to summary |
|---|---|
| public <T> T execute(TransactionCallback<T> action) throws TransactionException Implements org. Doc from org. Execute the action specified by the given callback object within a transaction. Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. A RuntimeException thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template.
| |
| executeWithoutResult | back to summary |
|---|---|
| public void executeWithoutResult(Consumer<TransactionStatus> action) throws TransactionException Overrides default org. Doc from org. Execute the action specified by the given If you need to return an object from the callback or access the
This variant is analogous to using a
| |