|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.transaction.TransactionImpl
public class TransactionImpl
Implementation of the transaction. Transactions are normally associated with a single thread.
| Field Summary |
|---|
| Fields inherited from interface javax.transaction.Transaction |
|---|
TMFAIL, TMSUCCESS, TMSUSPEND |
| Method Summary | |
|---|---|
boolean |
allowLocalTransactionOptimization()
Returns true if the local transaction optimization would be allowed. |
void |
close()
Close the transaction, rolling back everything and removing all enlisted resources. |
void |
commit()
Commit the transaction. |
boolean |
delistResource(XAResource resource,
int flag)
delists a resource from the current transaction |
boolean |
enlistResource(XAResource resource)
Enlists a resource with the current transaction. |
java.lang.Object |
getAttribute(java.lang.String var)
Gets an attribute. |
int |
getEnlistedResourceCount()
Returns the current number of resources. |
int |
getStatus()
Returns the status of this transaction |
int |
getTransactionTimeout()
sets the timeout for the transaction |
Xid |
getXid()
|
void |
handleAlarm(Alarm alarm)
Handles a callback from an alarm. |
boolean |
isEmpty()
Return true if the transaction has no resources. |
void |
registerSynchronization(Synchronization sync)
Register a synchronization callback |
void |
rollback()
Rollback the transaction. |
void |
setAttribute(java.lang.String var,
java.lang.Object value)
Adds an attribute. |
void |
setRollbackOnly()
Force any completion to be a rollback. |
void |
setRollbackOnly(java.lang.Throwable exn)
Force any completion to be a rollback. |
void |
setTransactionTimeout(int seconds)
sets the timeout for the transaction |
void |
setUserTransaction(UserTransactionImpl ut)
Sets the user transaction. |
java.lang.String |
toString()
Printable version of the transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void setUserTransaction(UserTransactionImpl ut)
public boolean isEmpty()
public boolean enlistResource(XAResource resource)
throws RollbackException,
SystemException
enlistResource in interface TransactionRollbackException
SystemExceptionpublic boolean allowLocalTransactionOptimization()
public int getEnlistedResourceCount()
public boolean delistResource(XAResource resource,
int flag)
throws SystemException
delistResource in interface Transactionresource - the resource to delistflag - XXX: ???
SystemException
public void setAttribute(java.lang.String var,
java.lang.Object value)
public java.lang.Object getAttribute(java.lang.String var)
public Xid getXid()
public int getStatus()
getStatus in interface Transactionpublic void registerSynchronization(Synchronization sync)
registerSynchronization in interface Transaction
public void setRollbackOnly()
throws SystemException
setRollbackOnly in interface TransactionSystemExceptionpublic void setRollbackOnly(java.lang.Throwable exn)
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException
commit in interface TransactionRollbackException
HeuristicMixedException
HeuristicRollbackException
SystemExceptionpublic void rollback()
rollback in interface Transaction
public void setTransactionTimeout(int seconds)
throws SystemException
SystemException
public int getTransactionTimeout()
throws SystemException
SystemExceptionpublic void handleAlarm(Alarm alarm)
AlarmListener
handleAlarm in interface AlarmListenerpublic void close()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||