| Modifier and Type | Method and Description |
|---|---|
| public <T> T | Returns: The value returned by the workThe supplied piece of work must be run outside the context of a transaction. |
| public <T> T | |
| public <T> T | Returns: The value returned by the workA new transaction is required to run the supplied piece of work. |
| public <T> T |
| notSupported | back to summary |
|---|---|
| public <T> T notSupported(Callable<T> work) throws TransactionException, ScopedWorkException The supplied piece of work must be run outside the context of a transaction. If an existing transaction is active then it must be suspended and a "no transaction" context associated with the work. After the work has completed any suspended transaction must be resumed. 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
| |
| required | back to summary |
|---|---|
| public <T> T required(Callable<T> work) throws TransactionException, TransactionRolledBackException, ScopedWorkException A transaction is required to run the supplied piece of work. If no transaction is active then it must be started and associated with the work and then completed after the transactional work has finished.
| |
| requiresNew | back to summary |
|---|---|
| public <T> T requiresNew(Callable<T> work) throws TransactionException, TransactionRolledBackException, ScopedWorkException A new transaction is required to run the supplied piece of work. If an existing transaction is active then it must suspended and a new transaction started and associated with the work. After the work has completed the new transaction must also complete and any suspended transaction be resumed.
| |
| supports | back to summary |
|---|---|
| public <T> T supports(Callable<T> work) throws TransactionException, ScopedWorkException The supplied piece of work may run inside or outside the context of a transaction. If an existing transaction or "no transaction" context is active then it will continue, otherwise a new "no transaction" context is associated with the work. After the work has completed any created transaction context must be completed. 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
| |