@ProviderType public interface TransactionStarter
| Modifier and Type | Method and Description |
|---|---|
<T> T |
notSupported(java.util.concurrent.Callable<T> work)
The supplied piece of work must be run outside the context of a
transaction.
|
<T> T |
required(java.util.concurrent.Callable<T> work)
A transaction is required to run the supplied piece of work.
|
<T> T |
requiresNew(java.util.concurrent.Callable<T> work)
A new transaction is required to run the supplied piece of work.
|
<T> T |
supports(java.util.concurrent.Callable<T> work)
The supplied piece of work may run inside or outside the context of a
transaction.
|
<T> T required(java.util.concurrent.Callable<T> work)
throws TransactionException,
TransactionRolledBackException,
ScopedWorkException
work - TransactionException - if there is an error starting or completing
the transactionTransactionRolledBackException - if the transaction rolled back due
to a failure in one of the resources or an internal error in
the TransactionControl serviceScopedWorkException - if the supplied work throws an
Exception<T> T requiresNew(java.util.concurrent.Callable<T> work)
throws TransactionException,
TransactionRolledBackException,
ScopedWorkException
work - TransactionException - if there is an error starting or completing
the transactionTransactionRolledBackException - if the transaction rolled back due
to a failureScopedWorkException - if the supplied work throws an
Exception<T> T notSupported(java.util.concurrent.Callable<T> work)
throws TransactionException,
ScopedWorkException
The "no transaction" context does not support resource enlistment, and will not commit or rollback any changes, however it does provide a post completion callback to any registered functions. This function is suitable for final cleanup, such as closing a connection
work - TransactionException - if there is an error starting or completing
the transactionScopedWorkException - if the supplied work throws an
Exception<T> T supports(java.util.concurrent.Callable<T> work)
throws TransactionException,
ScopedWorkException
The "no transaction" context does not support resource enlistment, and will not commit or rollback any changes, however it does provide a post completion callback to any registered functions. This function is suitable for final cleanup, such as closing a connection
work - TransactionException - if there is an error starting or completing
the transactionScopedWorkException - if the supplied work throws an
ExceptionCopyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0