|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITxManager
This interface specifies the functionality that TxManager implementations shouls support in order to wrap the JTA transaction manager as specified by the new SAP transaction specification.
| Method Summary | |
|---|---|
void |
commitLevel(TransactionTicket txticket)
Commmits the transaction level associated with the given transaction ticket. |
Synchronization |
getRegisteredSynchronization(String SID)
Gets the Synchronization object previously registered with
the current transaction under the given synchronization id (SID). |
int |
getStatus()
Gets the status of the current transaction |
boolean |
isTxActive()
Checks whether the transaction associated with the current thread is active. |
boolean |
isTxMarkedRollback()
Checks whether the transaction associated with the current thread is marked for rollback. |
void |
leaveLevel(TransactionTicket txticket)
Finishes and leaves the transaction level associated with the given transaction ticket. |
void |
registerSynchronization(String SID,
Synchronization sync)
Registers the given Synchronization object with the
current transaction. |
TransactionTicket |
required()
Requires a new JTA transaction to be started or an already open transaction to be joined. |
TransactionTicket |
requiresNew()
Requires a new transaction to be started. |
void |
setRollbackOnly()
Marks the current JTA transaction for rollback. |
| Method Detail |
|---|
TransactionTicket required()
throws TxException,
TxRollbackException
The method returns a transaction ticket as a unique identifier for this
transaction level. Later on, this ticket has to be passed as an argument
to the methods commitLevel() and leaveLevel(),
in order to associate them with the transaction level opened by this
call.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
TxRollbackException - thrown if there is already a transaction associated with
the current thread and this transaction is marked for
rollback only, for example, as a result of a
setRollbackOnly() call.
TransactionTicket requiresNew()
throws TxException
The method returns a transaction ticket as a unique identifier for this
transaction level. Later on, this ticket has to be passed as an argument
to the methods commitLevel() and leaveLevel(),
in order to associate them with the transaction level opened by this
call.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
void setRollbackOnly()
throws TxException,
TxDemarcationException
commitLevel() method is called on the transaction
level that has started the JTA transaction.
TxDemarcationException - thrown if no transaction is associated with the current
thread.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
int getStatus()
throws TxException
TxException - thrown if the transaction manager encounters an unexpected
error situation.
void commitLevel(TransactionTicket txticket)
throws TxException,
TxDemarcationException,
TxRollbackException
If no JTA transaction has been started on the this transaction level, then this method has no effect.
A TxRollbackException is thrown if the transaction was
rolled back rather than committed.
ticket - a transaction ticket.
TxRollbackException - thrown to indicate that the transaction has been rolled
back rather than committed.
TxDemarcationException - thrown if the belance of the transaction demarcation calls
has been violated.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
void leaveLevel(TransactionTicket txticket)
throws TxException,
TxDemarcationException,
TxRollbackException
If the commitLevel() method has already been called on the
transaction level identified by this ticket, this method has no further
effect than finishing the current transaction level. Otherwise, if the
commitLevel() method has not yet been called on this
transaction level, the following two cases must be distinguished:
afterCompletion() methods of the registered
Synchronization objects are called immediately after the
rollback operation was executed.
In both cases, a TxRollbackException is thrown in order to
indicate that the current JTA transaction has been rolled back or has
been marked for rollback only.
Finally, if a JTA transaction has been suspended on this transaction level because a new one was started, then this suspended transaction will be resumed before this method is left.
ticket - a transaction ticket.
TxRollbackException - thrown to indicate that the transaction has been rolled
back rather than committed.
TxDemarcationException - thrown if the belance of the transaction demarcation calls
has been violated.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
void registerSynchronization(String SID,
Synchronization sync)
throws TxException,
TxDemarcationException,
TxRollbackException,
TxDuplicateOIDRegistrationException
Synchronization object with the
current transaction. The specified synchronization id (SID) is used to
define an order on the registered synchronization objects, thus reducing
the probability of database deadlocks.
sid - a synchronization identifiersync - a Synchronization object implementing the
beforeCompletion() and
afterCompletion() callbacks.
TxSynchronizationException - thrown if the given synchronization object conflicts with
a another synchronization object that has already been
registered under the same synchronization id before.
TxDemarcationException - thrown if no transaction is associated with the current
thread.
TxRollbackException - thrown if the transaction associated with the current
thread is marked for "rollback only".
TxException - thrown if the transaction manager encounters an unexpected
error situation.
TxDuplicateOIDRegistrationException
Synchronization getRegisteredSynchronization(String SID)
throws TxException,
TxDemarcationException
Synchronization object previously registered with
the current transaction under the given synchronization id (SID).
sid - a synchronization identifier
Synchronization object registered with the
specified SID, null if no
Synchronization object has been registered under
the given SID.
TxDemarcationException - thrown if no transaction is associated with the current
thread.
TxException - thrown if the transaction manager encounters an unexpected
error situation.
boolean isTxActive()
throws TxException
TxException - thrown if the transaction manager encounters an unexpected
error situation.
boolean isTxMarkedRollback()
throws TxException
TxException - thrown if the transaction manager encounters an unexpected
error situation.| Access Rights |
|---|
| SC | DC |
|---|---|
[sap.com] ENGFACADE
|
[sap.com] tc/je/txmanager/api
|
|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||