|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.slide.transaction.SlideTransaction
JTA Transaction implementation.
| Field Summary | |
protected static java.lang.String |
LOG_CHANNEL
|
| Constructor Summary | |
SlideTransaction(SlideTransactionManager transactionManager)
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. |
static java.lang.String |
getXAErrorCode(java.lang.Throwable throww)
Return a String representation of the error code contained in a XAException. |
static java.lang.String |
getXAErrorCode(javax.transaction.xa.XAException xae)
Return a String representation of the error code contained in a XAException. |
static java.lang.String |
getXAFlag(int flag)
Return a String representation of a flag. |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final java.lang.String LOG_CHANNEL
| Constructor Detail |
public SlideTransaction(SlideTransactionManager transactionManager)
| 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.Transactionjavax.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.TransactionxaRes - The XAResource object representing the resource to delistflag - One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL
java.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.TransactionxaRes - The XAResource object representing the resource to delist
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 void rollback()
throws java.lang.SecurityException,
java.lang.IllegalStateException,
javax.transaction.SystemException
rollback in interface javax.transaction.Transactionjava.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.Transactionjava.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.Transactionjavax.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.Transactionsync - 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 static java.lang.String getXAErrorCode(java.lang.Throwable throww)
public static java.lang.String getXAErrorCode(javax.transaction.xa.XAException xae)
public static java.lang.String getXAFlag(int flag)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||