|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.slide.transaction.SlideTransaction
JTA Transaction implementation.
Constructor Summary | |
SlideTransaction()
Constructor. |
Method Summary | |
void |
commit()
Complete the transaction represented by this Transaction object. |
boolean |
delistResource(javax.transaction.xa.XAResource xaRes,
int flag)
Delist the resource specified from the current transaction associated with the calling thread. |
boolean |
enlistResource(javax.transaction.xa.XAResource xaRes)
Enlist the resource specified with the current transaction context of the calling thread. |
int |
getStatus()
Obtain the status of the transaction associated with the current thread. |
void |
registerSynchronization(javax.transaction.Synchronization sync)
Register a synchronization object for the transaction currently associated with the calling thread. |
void |
rollback()
Roll back the transaction associated with the current thread. |
void |
setRollbackOnly()
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction. |
java.lang.String |
toString()
Print the Transaction object in a debugger friendly manner |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public SlideTransaction()
Method Detail |
public void commit() throws javax.transaction.RollbackException, javax.transaction.HeuristicMixedException, javax.transaction.HeuristicRollbackException, java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
commit
in interface javax.transaction.Transaction
javax.transaction.RollbackException
- Thrown to indicate that the transaction
has been rolled back rather than committed.javax.transaction.HeuristicMixedException
- Thrown to indicate that a heuristic
decision was made and that some relevant updates have been committed
while others have been rolled back.javax.transaction.HeuristicRollbackException
- Thrown to indicate that a
heuristic decision was made and that some relevant updates have been
rolled back.java.lang.SecurityException
- Thrown to indicate that the thread is not
allowed to commit the transaction.java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public boolean delistResource(javax.transaction.xa.XAResource xaRes, int flag) throws java.lang.IllegalStateException, javax.transaction.SystemException
delistResource
in interface javax.transaction.Transaction
xaRes
- The XAResource object representing the resource to delistflag
- One of the values of TMSUCCESS, TMSUSPEND, or TMFAILjava.lang.IllegalStateException
- Thrown if the transaction in the
target object is inactive.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public boolean enlistResource(javax.transaction.xa.XAResource xaRes) throws javax.transaction.RollbackException, java.lang.IllegalStateException, javax.transaction.SystemException
enlistResource
in interface javax.transaction.Transaction
xaRes
- The XAResource object representing the resource to delistjavax.transaction.RollbackException
- Thrown to indicate that the transaction
has been marked for rollback only.java.lang.IllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.javax.transaction.SystemException
- Thrown if the transaction manager
encounters an unexpected error condition.public void rollback() throws java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
rollback
in interface javax.transaction.Transaction
java.lang.SecurityException
- Thrown to indicate that the thread is not
allowed to commit the transaction.java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.Transaction
java.lang.IllegalStateException
- Thrown if the current thread is not
associated with a transaction.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public int getStatus() throws javax.transaction.SystemException
getStatus
in interface javax.transaction.Transaction
javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public void registerSynchronization(javax.transaction.Synchronization sync) throws javax.transaction.RollbackException, java.lang.IllegalStateException, javax.transaction.SystemException
registerSynchronization
in interface javax.transaction.Transaction
sync
- The Synchronization object for the transaction associated
with the target object.javax.transaction.RollbackException
- Thrown to indicate that the transaction
has been marked for rollback only.java.lang.IllegalStateException
- Thrown if the transaction in the
target object is in prepared state or the transaction is inactive.javax.transaction.SystemException
- Thrown if the transaction manager encounters
an unexpected error condition.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |