| java.lang.Object org.jboss.tm.TxManager
Inner Class :static class ThreadInfo | |
Method Summary | |
public void | associateThread(Transaction transaction) | public void | begin() Begin a new transaction. | public void | cancelWork(Work work, Xid xid) | public void | commit() Commit the transaction associated with the currently running thread. | public void | commit(Xid xid, boolean onePhase) | public boolean | containsValue(TransactionLocal local, Transaction tx) | public Transaction | disassociateThread() The following 2 methods are here to provide association and
disassociation of the thread. | public void | endWork(Work work, Xid xid) | public void | forget(Xid xid) | public long | getCommitCount() | public int | getDefaultTransactionTimeout() Get the default transaction timeout. | TransactionImpl | getExternalTransaction(Xid xid) | public boolean | getGlobalIdsEnabled() Getter for attribute globalIdsEnabled . | public static TxManager | getInstance() Get a reference to the singleton instance. | public long | getRollbackCount() | public int | getStatus() Return the status of the transaction associated with the currently
running thread, or Status.STATUS_NO_TRANSACTION if no
active transaction is currently associated. | public long | getTimeLeftBeforeTransactionTimeout(boolean errorRollback) | public Transaction | getTransaction() Return the transaction currently associated with the invoking thread,
or null if no active transaction is currently associated. | public int | getTransactionCount() | public TransactionIntegrity | getTransactionIntegrity() | public Object | getTransactionPropagationContext() Return a TPC for the current transaction. | public Object | getTransactionPropagationContext(Transaction tx) Return a TPC for the argument transaction. | public int | getTransactionTimeout() | public Object | getValue(TransactionLocal local, Transaction tx) | TransactionImpl | importExternalTransaction(Xid xid, long timeOut) | public Transaction | importTransactionPropagationContext(Object tpc) Import a transaction propagation context into this TM.
The TPC is loosely typed, as we may (at a later time) want to
import TPCs that come from other transaction domains without
offloading the conversion to the client.
Parameters: tpc - The transaction propagation context that we want toimport into this TM. | void | incCommitCount() | void | incRollbackCount() | public boolean | isInterruptThreads() | public void | lock(TransactionLocal local, Transaction tx) | public int | prepare(Xid xid) | public Xid[] | recover(int flag) | public void | registerWork(Work work, Xid xid, long timeout) | void | releaseTransactionImpl(TransactionImpl tx) Release the given TransactionImpl. | public void | resume(Transaction transaction) Resume a transaction.
Note: This will not enlist any resources involved in this
transaction. | public void | rollback() Roll back the transaction associated with the currently running thread. | public void | rollback(Xid xid) | public void | setDefaultTransactionTimeout(int seconds) Set the default transaction timeout for new transactions. | public void | setGlobalIdsEnabled(boolean newValue) Setter for attribute globalIdsEnabled . | public void | setInterruptThreads(boolean interruptThreads) Enable/disable thread interruption at transaction timeout. | public void | setRollbackOnly() Mark the transaction associated with the currently running thread
so that the only possible outcome is a rollback. | public void | setTransactionIntegrity(TransactionIntegrity integrity) | public void | setTransactionTimeout(int seconds) Set the transaction timeout for new transactions started by the
calling thread. | public void | startWork(Work work, Xid xid) | public void | storeValue(TransactionLocal local, Transaction tx, Object value) | public Transaction | suspend() Suspend the transaction currently associated with the current
thread, and return it.
Note: This will not delist any resources involved in this
transaction. | public void | unlock(TransactionLocal local, Transaction tx) |
associateThread | public void associateThread(Transaction transaction)(Code) | | |
begin | public void begin() throws NotSupportedException, SystemException(Code) | | Begin a new transaction.
The new transaction will be associated with the calling thread.
|
cancelWork | public void cancelWork(Work work, Xid xid)(Code) | | |
commit | public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException(Code) | | Commit the transaction associated with the currently running thread.
|
disassociateThread | public Transaction disassociateThread()(Code) | | The following 2 methods are here to provide association and
disassociation of the thread.
|
endWork | public void endWork(Work work, Xid xid)(Code) | | |
getCommitCount | public long getCommitCount()(Code) | | A count of the transactions that have been committed
|
getDefaultTransactionTimeout | public int getDefaultTransactionTimeout()(Code) | | Get the default transaction timeout.
Default transaction timeout in seconds. |
getGlobalIdsEnabled | public boolean getGlobalIdsEnabled()(Code) | | Getter for attribute globalIdsEnabled .
|
getInstance | public static TxManager getInstance()(Code) | | Get a reference to the singleton instance.
|
getRollbackCount | public long getRollbackCount()(Code) | | A count of the transactions that have been rolled back
|
getStatus | public int getStatus() throws SystemException(Code) | | Return the status of the transaction associated with the currently
running thread, or Status.STATUS_NO_TRANSACTION if no
active transaction is currently associated.
|
getTimeLeftBeforeTransactionTimeout | public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws RollbackException(Code) | | |
getTransaction | public Transaction getTransaction() throws SystemException(Code) | | Return the transaction currently associated with the invoking thread,
or null if no active transaction is currently associated.
|
getTransactionCount | public int getTransactionCount()(Code) | | Return the number of active transactions
|
getTransactionIntegrity | public TransactionIntegrity getTransactionIntegrity()(Code) | | Get the transaction integrity policy
the transaction integrity policy |
getTransactionPropagationContext | public Object getTransactionPropagationContext()(Code) | | Return a TPC for the current transaction.
|
getTransactionPropagationContext | public Object getTransactionPropagationContext(Transaction tx)(Code) | | Return a TPC for the argument transaction.
|
getTransactionTimeout | public int getTransactionTimeout()(Code) | | |
importTransactionPropagationContext | public Transaction importTransactionPropagationContext(Object tpc)(Code) | | Import a transaction propagation context into this TM.
The TPC is loosely typed, as we may (at a later time) want to
import TPCs that come from other transaction domains without
offloading the conversion to the client.
Parameters: tpc - The transaction propagation context that we want toimport into this TM. Currently this is an instanceof LocalId. At some later time this may be an instanceof a transaction propagation context from anothertransaction domain likeorg.omg.CosTransactions.PropagationContext. A transaction representing this transaction propagationcontext, or null if this TPC cannot be imported. |
incCommitCount | void incCommitCount()(Code) | | Increment the commit count
|
incRollbackCount | void incRollbackCount()(Code) | | Increment the rollback count
|
isInterruptThreads | public boolean isInterruptThreads()(Code) | | Is thread interruption enabled at transaction timeout
true for interrupt threads, false otherwise |
registerWork | public void registerWork(Work work, Xid xid, long timeout) throws WorkCompletedException(Code) | | |
releaseTransactionImpl | void releaseTransactionImpl(TransactionImpl tx)(Code) | | Release the given TransactionImpl.
|
resume | public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException(Code) | | Resume a transaction.
Note: This will not enlist any resources involved in this
transaction. According to JTA1.0.1 specification section 3.2.3,
that is the responsibility of the application server.
|
setDefaultTransactionTimeout | public void setDefaultTransactionTimeout(int seconds)(Code) | | Set the default transaction timeout for new transactions.
This default value is used if setTransactionTimeout()
was never called, or if it was called with a value of 0 .
|
setGlobalIdsEnabled | public void setGlobalIdsEnabled(boolean newValue)(Code) | | Setter for attribute globalIdsEnabled .
|
setInterruptThreads | public void setInterruptThreads(boolean interruptThreads)(Code) | | Enable/disable thread interruption at transaction timeout.
Parameters: interruptThreads - pass true to interrupt threads, false otherwise |
setRollbackOnly | public void setRollbackOnly() throws IllegalStateException, SystemException(Code) | | Mark the transaction associated with the currently running thread
so that the only possible outcome is a rollback.
|
setTransactionIntegrity | public void setTransactionIntegrity(TransactionIntegrity integrity)(Code) | | Set the transaction integrity policy
Parameters: integrity - the transaction integrity policy |
setTransactionTimeout | public void setTransactionTimeout(int seconds) throws SystemException(Code) | | Set the transaction timeout for new transactions started by the
calling thread.
|
startWork | public void startWork(Work work, Xid xid) throws WorkCompletedException(Code) | | |
suspend | public Transaction suspend() throws SystemException(Code) | | Suspend the transaction currently associated with the current
thread, and return it.
Note: This will not delist any resources involved in this
transaction. According to JTA1.0.1 specification section 3.2.3,
that is the responsibility of the application server.
|
|
|