|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.tm.TxManager
Our TransactionManager implementation.
Method Summary | |
void |
associateThread(javax.transaction.Transaction transaction)
|
void |
begin()
Begin a new transaction. |
void |
commit()
Commit the transaction associated with the currently running thread. |
javax.transaction.Transaction |
disassociateThread()
|
int |
getDefaultTransactionTimeout()
Get the default transaction timeout. |
static TxManager |
getInstance()
Get a reference to the singleton instance. |
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. |
javax.transaction.Transaction |
getTransaction()
Return the transaction currently associated with the invoking thread, or null if no active transaction is currently associated. |
java.lang.Object |
getTransactionPropagationContext()
Return a TPC for the current transaction. |
java.lang.Object |
getTransactionPropagationContext(javax.transaction.Transaction tx)
Return a TPC for the argument transaction. |
javax.transaction.Transaction |
importTransactionPropagationContext(java.lang.Object tpc)
Import a transaction propagation context into this TM. |
void |
resume(javax.transaction.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. |
javax.transaction.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 javax.transaction.NotSupportedException, javax.transaction.SystemException
begin
in interface javax.transaction.TransactionManager
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.TransactionManager
public int getStatus() throws javax.transaction.SystemException
Status.STATUS_NO_TRANSACTION
if no
active transaction is currently associated.getStatus
in interface javax.transaction.TransactionManager
public javax.transaction.Transaction getTransaction() throws javax.transaction.SystemException
null
if no active transaction is currently associated.getTransaction
in interface javax.transaction.TransactionManager
public void resume(javax.transaction.Transaction transaction) throws javax.transaction.InvalidTransactionException, java.lang.IllegalStateException, javax.transaction.SystemException
resume
in interface javax.transaction.TransactionManager
public javax.transaction.Transaction suspend() throws javax.transaction.SystemException
suspend
in interface javax.transaction.TransactionManager
public void rollback() throws java.lang.IllegalStateException, java.lang.SecurityException, javax.transaction.SystemException
rollback
in interface javax.transaction.TransactionManager
public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.TransactionManager
public void setTransactionTimeout(int seconds) throws javax.transaction.SystemException
setTransactionTimeout
in interface javax.transaction.TransactionManager
public void setDefaultTransactionTimeout(int seconds)
setTransactionTimeout()
was never called, or if it was called with a value of 0
.public int getDefaultTransactionTimeout()
public javax.transaction.Transaction disassociateThread()
public void associateThread(javax.transaction.Transaction transaction)
public javax.transaction.Transaction importTransactionPropagationContext(java.lang.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 java.lang.Object getTransactionPropagationContext()
getTransactionPropagationContext
in interface TransactionPropagationContextFactory
public java.lang.Object getTransactionPropagationContext(javax.transaction.Transaction tx)
getTransactionPropagationContext
in interface TransactionPropagationContextFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |