|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interceptor interface allows an external engine to hook up into the transaction monitor and either record the outcome of transactions or affect them.
The interceptor is notified when transactions are created, attempt to commit, rolled back, and when they are resumed or suspended from threads.
The interceptor may affect the outcome of an attempt to commit or resume a transaction.
The interceptor is notified of the outcome of each transaction in the form of a heuristic decision made regarding the transaction and all it's resources.
Method Summary | |
void |
begin(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has begun. |
void |
commit(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has been asked to commit. |
void |
completed(javax.transaction.xa.Xid xid,
int heuristic)
Called to indicate that a heuristic decision has been made regarding this transaction and the outcome of such a decision. |
void |
resume(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
Called to indicate that a transaction is been resumed in the specified thread. |
void |
rollback(javax.transaction.xa.Xid xid)
Called to indicate that a transaction has been asked to rollback. |
void |
suspend(javax.transaction.xa.Xid xid,
java.lang.Thread thread)
Called to indicate that a transaction has been suspended from the specified thread, and the thread is no longer associated with the transaction. |
Method Detail |
public void begin(javax.transaction.xa.Xid xid)
public void commit(javax.transaction.xa.Xid xid) throws javax.transaction.RollbackException
RollbackException
or marks the transaction
for rollback, the transaction will not commit.
xid
- The transaction identifier
javax.transaction.RollbackException
- Thrown to indicate that the
transaction must not commitpublic void rollback(javax.transaction.xa.Xid xid)
xid
- The transaction identifierpublic void completed(javax.transaction.xa.Xid xid, int heuristic)
xid
- The transaction identifierheuristic
- The heuristic decisionpublic void resume(javax.transaction.xa.Xid xid, java.lang.Thread thread) throws javax.transaction.InvalidTransactionException
InvalidTransactionException
to prevent
the thread from resuming.
xid
- The transaction identifierthread
- The associated thread
javax.transaction.InvalidTransactionException
- Prevents the thread
from being associated with this transactionpublic void suspend(javax.transaction.xa.Xid xid, java.lang.Thread thread)
xid
- The transaction identifierthread
- The associated thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |