|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SleeTransactionManager
The SleeTransactionManager interface extends the JTA
TransactionManager interface by providing asynchronous commit and rollback
operations.
| Method Summary | |
|---|---|
SleeTransaction |
asSleeTransaction(javax.transaction.Transaction tx)
Get a SleeTransaction object for a generic Transaction
object. |
void |
asyncCommit(CommitListener listener)
Request that the transaction associated with the current thread asynchronously commit. |
void |
asyncRollback(RollbackListener listener)
Request that the transaction associated with the current thread asynchronously roll back. |
SleeTransaction |
beginSleeTransaction()
Begin a new transaction and associate it with the current thread. |
SleeTransaction |
getSleeTransaction()
Get the SleeTransaction object that represents the transaction context of the
calling thread. |
| Methods inherited from interface javax.transaction.TransactionManager |
|---|
begin, commit, getStatus, getTransaction, resume, rollback, setRollbackOnly, setTransactionTimeout, suspend |
| Method Detail |
|---|
SleeTransaction beginSleeTransaction()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
SleeTransactionManager txManager = ...;
txManager.begin();
SleeTransaction tx = txManager.getSleeTransaction();
This method is a non-transactional method, however after this method returns a new transaction has become associated with the calling thread.
SleeTransaction object representing the new transaction.
javax.transaction.NotSupportedException - if the thread is already associated with a transaction
and the transaction manager implementation does not support nested transactions.
javax.transaction.SystemException - if the transaction could not be started due to a system-level
failure.
SleeTransaction getSleeTransaction()
throws javax.transaction.SystemException
SleeTransaction object that represents the transaction context of the
calling thread. This method is a convenience method equivalent to:
SleeTransactionManager txManager = ...;
SleeTransaction tx = txManager.asSleeTransaction(txManager.getTransaction());
This method is a non-transactional method.
SleeTransaction object that represents the transaction context
of the calling thread, or null if the thread is not currently
associated with a transaction.
javax.transaction.SystemException - if the transaction object could not be obtained due to a
system-level failure.
SleeTransaction asSleeTransaction(javax.transaction.Transaction tx)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
javax.transaction.SystemException
SleeTransaction object for a generic Transaction
object.
tx - the Transaction object. The transaction represented by this
object must have been started by this transaction manager.
SleeTransaction object for the specified transaction.
java.lang.NullPointerException - if tx is null.
java.lang.IllegalArgumentException - if tx represents a transaction that was
not started by this transaction manager.
javax.transaction.SystemException - if the transaction object could not be obtained due to a
system-level failure.
void asyncCommit(CommitListener listener)
throws java.lang.IllegalStateException,
java.lang.SecurityException
If the transaction has been marked for rollback, or if execution of any
Synchronization.beforeCompletion() callbacks cause it to
be marked for rollback, then a rollback will be started (equivalent to calling
asyncRollback(javax.slee.transaction.RollbackListener)).
At some point after calling this method, the transaction state will become either
Status.STATUS_COMMITTED or
Status.STATUS_ROLLEDBACK.
This method is a mandatory transactional method.
listener - listener object that will receive callbacks depending on the final
outcome of the transaction. If this argument is null, no callbacks
will be made by the SLEE.
java.lang.IllegalStateException - if a transaction is not currently associated with the
calling thread.
java.lang.SecurityException - if the current thread is not allowed to commit the transaction.
void asyncRollback(RollbackListener listener)
throws java.lang.IllegalStateException,
java.lang.SecurityException
At some point after calling this method, the transaction state will become
Status.STATUS_ROLLEDBACK.
This method is a mandatory transactional method.
listener - listener object that will receive callbacks depending on the final
outcome of the transaction. If this argument is null, no callbacks
will be made by the SLEE.
java.lang.IllegalStateException - if a transaction is not currently associated with the
calling thread.
java.lang.SecurityException - if the current thread is not allowed to roll back the transaction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||