|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.tm.TxManager
Our TransactionManager implementation.
Method Summary | |
void |
associateThread(Transaction transaction)
|
void |
begin()
Begin a new transaction. |
void |
commit()
Commit the transaction associated with the currently running thread. |
boolean |
containsValue(TransactionLocal local,
Transaction tx)
does TransactionImpl contain object? |
Transaction |
disassociateThread()
The following 2 methods are here to provide association and disassociation of the thread. |
long |
getCommitCount()
A count of the transactions that have been committed |
int |
getDefaultTransactionTimeout()
Get the default transaction timeout. |
static TxManager |
getInstance()
Get a reference to the singleton instance. |
long |
getRollbackCount()
A count of the transactions that have been rolled back |
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. |
Transaction |
getTransaction()
Return the transaction currently associated with the invoking thread, or null if no active transaction is currently associated. |
int |
getTransactionCount()
Return the number of active transactions |
Object |
getTransactionPropagationContext()
Return a TPC for the current transaction. |
Object |
getTransactionPropagationContext(Transaction tx)
Return a TPC for the argument transaction. |
int |
getTransactionTimeout()
Get the transaction timeout. |
Object |
getValue(TransactionLocal local,
Transaction tx)
get the transaction local value. |
Transaction |
importTransactionPropagationContext(Object tpc)
Import a transaction propagation context into this TM. |
void |
resume(Transaction transaction)
Resume a transaction. |
void |
rollback()
Roll back the transaction associated with the currently running thread. |
void |
setDefaultTransactionTimeout(int seconds)
Set the default transaction timeout for new transactions. |
void |
setRollbackOnly()
Mark the transaction associated with the currently running thread so that the only possible outcome is a rollback. |
void |
setTransactionTimeout(int seconds)
Set the transaction timeout for new transactions started by the calling thread. |
void |
storeValue(TransactionLocal local,
Transaction tx,
Object value)
put the value in the TransactionImpl map |
Transaction |
suspend()
Suspend the transaction currently associated with the current thread, and return it. |
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 begin() throws NotSupportedException, SystemException
begin
in interface TransactionManager
NotSupportedException
SystemException
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
commit
in interface TransactionManager
public int getStatus() throws SystemException
Status.STATUS_NO_TRANSACTION
if no
active transaction is currently associated.
getStatus
in interface TransactionManager
SystemException
public Transaction getTransaction() throws SystemException
null
if no active transaction is currently associated.
getTransaction
in interface TransactionManager
SystemException
public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException
resume
in interface TransactionManager
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface TransactionManager
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface TransactionManager
IllegalStateException
SystemException
public int getTransactionTimeout() throws SystemException
TransactionTimeoutConfiguration
getTransactionTimeout
in interface TransactionTimeoutConfiguration
SystemException
- for any errorpublic void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface TransactionManager
SystemException
public void setDefaultTransactionTimeout(int seconds)
setTransactionTimeout()
was never called, or if it was called with a value of 0
.
public int getDefaultTransactionTimeout()
public Transaction disassociateThread()
public void associateThread(Transaction transaction)
public int getTransactionCount()
public long getCommitCount()
public long getRollbackCount()
public Transaction importTransactionPropagationContext(Object tpc)
importTransactionPropagationContext
in interface TransactionPropagationContextImporter
tpc
- The transaction propagation context that we want to
import into this TM. Currently this is an instance
of GlobalId. 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 TransactionPropagationContextFactory
public Object getTransactionPropagationContext(Transaction tx)
getTransactionPropagationContext
in interface TransactionPropagationContextFactory
public Object getValue(TransactionLocal local, Transaction tx)
getValue
in interface TransactionLocalDelegate
public void storeValue(TransactionLocal local, Transaction tx, Object value)
storeValue
in interface TransactionLocalDelegate
public boolean containsValue(TransactionLocal local, Transaction tx)
containsValue
in interface TransactionLocalDelegate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |