|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionManager
Fenix Framework's interface for all Transaction Managers. This interface is
similar to TransactionManager
's interface with some
extensions added.
Please refer to the documentation in each individual backend for the list of
supported operations.
javax.transaction
Method Summary | ||
---|---|---|
void |
addCommitListener(CommitListener listener)
Registers a commit listener, that will be called whenever any Transaction managed by this Manager is committed. |
|
void |
begin(boolean readOnly)
Create a new transaction and associate it with the current thread. |
|
Transaction |
getTransaction()
Get the Transaction object that represents the transaction
context of the calling thread. |
|
void |
removeCommitListener(CommitListener listener)
Unregisters the given commit listener. |
|
|
withTransaction(Callable<T> command)
Transactionally execute a command, possibly returning a result. |
|
|
withTransaction(Callable<T> command,
Atomic atomic)
Transactionally execute a command, possibly returning a result. |
|
|
withTransaction(CallableWithoutException<T> command)
Transactionally execute a command, possibly returning a result. |
Methods inherited from interface javax.transaction.TransactionManager |
---|
begin, commit, getStatus, resume, rollback, setRollbackOnly, setTransactionTimeout, suspend |
Method Detail |
---|
Transaction getTransaction()
Transaction
object that represents the transaction
context of the calling thread.
Subsequent calls to this method, while in the scope of a given
transaction, will always return the same instance.
getTransaction
in interface TransactionManager
<T> T withTransaction(CallableWithoutException<T> command)
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.<T> T withTransaction(Callable<T> command) throws Exception
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.
Exception
<T> T withTransaction(Callable<T> command, Atomic atomic) throws Exception
command
- The command to executeatomic
- the configuration for the execution of this command.
Exception
void begin(boolean readOnly) throws NotSupportedException, SystemException
true
.
NotSupportedException
- Thrown if the thread is already associated with a transaction
and the Transaction Manager implementation does not support
nested transactions.
SystemException
- Thrown if the transaction manager encounters an unexpected
error condition that prevents future transaction services
from proceeding.void addCommitListener(CommitListener listener)
Transaction
managed by this Manager is committed.
listener
- The listener to be added.
NullPointerException
- If the listener is null.void removeCommitListener(CommitListener listener)
listener
- The listener to be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |