|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.tm.TxManager
public class TxManager
Our TransactionManager implementation.
| Method Summary | |
|---|---|
void |
associateThread(Transaction transaction)
Deprecated. |
void |
begin()
Deprecated. Begin a new transaction. |
void |
cancelWork(javax.resource.spi.work.Work work,
Xid xid)
Deprecated. Invoked when the work fails |
void |
commit()
Deprecated. Commit the transaction associated with the currently running thread. |
void |
commit(Xid xid,
boolean onePhase)
Deprecated. |
boolean |
containsValue(TransactionLocal local,
Transaction tx)
Deprecated. does Transaction contain object? |
Transaction |
disassociateThread()
Deprecated. The following 2 methods are here to provide association and disassociation of the thread. |
void |
endWork(javax.resource.spi.work.Work work,
Xid xid)
Deprecated. Invoked when transaction inflow work ends |
void |
forget(Xid xid)
Deprecated. |
long |
getCommitCount()
Deprecated. A count of the transactions that have been committed |
int |
getDefaultTransactionTimeout()
Deprecated. Get the default transaction timeout. |
boolean |
getGlobalIdsEnabled()
Deprecated. Getter for attribute globalIdsEnabled. |
static TxManager |
getInstance()
Deprecated. Get a reference to the singleton instance. |
long |
getRollbackCount()
Deprecated. A count of the transactions that have been rolled back |
int |
getStatus()
Deprecated. Return the status of the transaction associated with the currently running thread, or Status.STATUS_NO_TRANSACTION if no
active transaction is currently associated. |
long |
getTimeLeftBeforeTransactionTimeout(boolean errorRollback)
Deprecated. Get the time left before transaction timeout |
Transaction |
getTransaction()
Deprecated. Return the transaction currently associated with the invoking thread, or null if no active transaction is currently associated. |
int |
getTransactionCount()
Deprecated. Return the number of active transactions |
TransactionIntegrity |
getTransactionIntegrity()
Deprecated. Get the transaction integrity policy |
Object |
getTransactionPropagationContext()
Deprecated. Return a TPC for the current transaction. |
Object |
getTransactionPropagationContext(Transaction tx)
Deprecated. Return a TPC for the argument transaction. |
int |
getTransactionTimeout()
Deprecated. Get the transaction timeout. |
Object |
getValue(TransactionLocal local,
Transaction tx)
Deprecated. get the transaction local value. |
Transaction |
importTransactionPropagationContext(Object tpc)
Deprecated. Import a transaction propagation context into this TM. |
boolean |
isInterruptThreads()
Deprecated. Is thread interruption enabled at transaction timeout |
void |
lock(TransactionLocal local,
Transaction tx)
Deprecated. Lock the transaction local in the context of this transaction |
int |
prepare(Xid xid)
Deprecated. |
Xid[] |
recover(int flag)
Deprecated. |
void |
registerWork(javax.resource.spi.work.Work work,
Xid xid,
long timeout)
Deprecated. Invoked for transaction inflow of work |
void |
resume(Transaction transaction)
Deprecated. Resume a transaction. |
void |
rollback()
Deprecated. Roll back the transaction associated with the currently running thread. |
void |
rollback(Xid xid)
Deprecated. |
void |
setDefaultTransactionTimeout(int seconds)
Deprecated. Set the default transaction timeout for new transactions. |
void |
setGlobalIdsEnabled(boolean newValue)
Deprecated. Setter for attribute globalIdsEnabled. |
void |
setInterruptThreads(boolean interruptThreads)
Deprecated. Enable/disable thread interruption at transaction timeout. |
void |
setRollbackOnly()
Deprecated. Mark the transaction associated with the currently running thread so that the only possible outcome is a rollback. |
void |
setTransactionIntegrity(TransactionIntegrity integrity)
Deprecated. Set the transaction integrity policy |
void |
setTransactionTimeout(int seconds)
Deprecated. Set the transaction timeout for new transactions started by the calling thread. |
void |
startWork(javax.resource.spi.work.Work work,
Xid xid)
Deprecated. Invoked for transaction inflow of work |
void |
storeValue(TransactionLocal local,
Transaction tx,
Object value)
Deprecated. put the value in the transaction local |
Transaction |
suspend()
Deprecated. Suspend the transaction currently associated with the current thread, and return it. |
void |
unlock(TransactionLocal local,
Transaction tx)
Deprecated. Unlock the transaction local in the context of this transaction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TxManager getInstance()
public void setGlobalIdsEnabled(boolean newValue)
globalIdsEnabled.
public boolean getGlobalIdsEnabled()
globalIdsEnabled.
public void setInterruptThreads(boolean interruptThreads)
interruptThreads - pass true to interrupt threads, false otherwisepublic boolean isInterruptThreads()
public void setTransactionIntegrity(TransactionIntegrity integrity)
integrity - the transaction integrity policypublic TransactionIntegrity getTransactionIntegrity()
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedException
SystemException
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
commit in interface TransactionManagerRollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
public int getStatus()
throws SystemException
Status.STATUS_NO_TRANSACTION if no
active transaction is currently associated.
getStatus in interface TransactionManagerSystemException
public Transaction getTransaction()
throws SystemException
null if no active transaction is currently associated.
getTransaction in interface TransactionManagerSystemException
public void resume(Transaction transaction)
throws InvalidTransactionException,
IllegalStateException,
SystemException
resume in interface TransactionManagerInvalidTransactionException
IllegalStateException
SystemException
public Transaction suspend()
throws SystemException
suspend in interface TransactionManagerSystemException
public void rollback()
throws IllegalStateException,
SecurityException,
SystemException
rollback in interface TransactionManagerIllegalStateException
SecurityException
SystemException
public void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagerIllegalStateException
SystemExceptionpublic int getTransactionTimeout()
TransactionTimeoutConfiguration
getTransactionTimeout in interface TransactionTimeoutConfiguration
public void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagerSystemExceptionpublic void setDefaultTransactionTimeout(int seconds)
setTransactionTimeout()
was never called, or if it was called with a value of 0.
public int getDefaultTransactionTimeout()
public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback)
throws RollbackException
TransactionTimeoutConfiguration
getTimeLeftBeforeTransactionTimeout in interface TransactionTimeoutConfigurationerrorRollback - throw an error if the transaction is marked for rollback
RollbackException - if the transaction is marked for rollback and
errorRollback is truepublic Transaction disassociateThread()
public void associateThread(Transaction transaction)
public int getTransactionCount()
public long getCommitCount()
public long getRollbackCount()
public Transaction importTransactionPropagationContext(Object tpc)
importTransactionPropagationContext in interface TransactionPropagationContextImportertpc - The transaction propagation context that we want to
import into this TM. Currently this is an instance
of LocalId. At some later time this may be an instance
of a transaction propagation context from another
transaction domain like
org.omg.CosTransactions.PropagationContext.
public Object getTransactionPropagationContext()
getTransactionPropagationContext in interface TransactionPropagationContextFactorypublic Object getTransactionPropagationContext(Transaction tx)
getTransactionPropagationContext in interface TransactionPropagationContextFactory
public void registerWork(javax.resource.spi.work.Work work,
Xid xid,
long timeout)
throws javax.resource.spi.work.WorkCompletedException
JBossXATerminator
registerWork in interface JBossXATerminatorwork - the work startingxid - the xid of the worktimeout - the transaction timeout
javax.resource.spi.work.WorkCompletedException - with error code WorkException.TX_CONCURRENT_WORK_DISALLOWED
when work is already present for the xid or whose completion is in progress, only
the global part of the xid must be used for this check.
public void startWork(javax.resource.spi.work.Work work,
Xid xid)
throws javax.resource.spi.work.WorkCompletedException
JBossXATerminator
startWork in interface JBossXATerminatorwork - the work startingxid - the xid of the work
javax.resource.spi.work.WorkCompletedException - with error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context
public void endWork(javax.resource.spi.work.Work work,
Xid xid)
JBossXATerminator
endWork in interface JBossXATerminatorwork - the work endingxid - the xid of the work
public void cancelWork(javax.resource.spi.work.Work work,
Xid xid)
JBossXATerminator
cancelWork in interface JBossXATerminatorwork - the work endingxid - the xid of the work
public int prepare(Xid xid)
throws XAException
prepare in interface javax.resource.spi.XATerminatorXAException
public void rollback(Xid xid)
throws XAException
rollback in interface javax.resource.spi.XATerminatorXAException
public void commit(Xid xid,
boolean onePhase)
throws XAException
commit in interface javax.resource.spi.XATerminatorXAException
public void forget(Xid xid)
throws XAException
forget in interface javax.resource.spi.XATerminatorXAException
public Xid[] recover(int flag)
throws XAException
recover in interface javax.resource.spi.XATerminatorXAException
public void lock(TransactionLocal local,
Transaction tx)
throws InterruptedException
TransactionLocalDelegate
lock in interface TransactionLocalDelegateInterruptedException - if the thread is interrupted
public void unlock(TransactionLocal local,
Transaction tx)
TransactionLocalDelegate
unlock in interface TransactionLocalDelegate
public Object getValue(TransactionLocal local,
Transaction tx)
TransactionLocalDelegate
getValue in interface TransactionLocalDelegate
public void storeValue(TransactionLocal local,
Transaction tx,
Object value)
TransactionLocalDelegate
storeValue in interface TransactionLocalDelegate
public boolean containsValue(TransactionLocal local,
Transaction tx)
TransactionLocalDelegate
containsValue in interface TransactionLocalDelegate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||