|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.tm.impl.TransactionManagerImpl
Implements a local transaction manager. The transaction manager
allows the application server to manage transactions on the local
thread through the TransactionManager
interface.
Nested transactions are supported if the server configuration indicates so, but all nested transactions appear as flat transactions to the resources and are not registered with the transaction server.
Tyrex#recycleThread
,
TransactionDomain
,
TransactionImpl
Field Summary |
Fields inherited from interface javax.transaction.Status |
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN |
Constructor Summary | |
(package private) |
TransactionManagerImpl(TransactionDomainImpl txDomain)
|
Method Summary | |
void |
begin()
|
void |
commit()
|
void |
delistResource(javax.transaction.xa.XAResource xaResource,
int flag)
Called to delist a resource from the current thread. |
void |
dumpCurrentTransaction(java.io.PrintWriter writer)
Convenience method. |
void |
dumpTransactionList(java.io.PrintWriter writer)
Convenience method. |
void |
enlistResource(javax.transaction.xa.XAResource xaResource)
Called to enlist a resource with the current thread. |
void |
enlistResource(javax.transaction.xa.XAResource xaResource,
XAResourceCallback callback)
Called to enlist a resource with the current thread. |
int |
getStatus()
|
javax.transaction.Transaction |
getTransaction()
|
javax.transaction.Transaction |
getTransaction(java.lang.String xid)
Returns a transaction based on the transaction identifier. |
javax.transaction.Transaction |
getTransaction(java.lang.Thread thread)
Returns the transaction currently associated with the given thread, or null if the thread is not associated with any transaction. |
javax.transaction.Transaction |
getTransaction(javax.transaction.xa.Xid xid)
Returns a transaction based on the transaction identifier. |
protected void |
internalResume(TransactionImpl tx)
Called to resume the current transaction, but does not attempt to associate the resources with this transaction. |
void |
resume(javax.transaction.Transaction tx)
|
void |
rollback()
|
void |
setRollbackOnly()
|
void |
setTransactionTimeout(int seconds)
|
javax.transaction.Transaction |
suspend()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
TransactionManagerImpl(TransactionDomainImpl txDomain)
Method Detail |
public void begin() throws javax.transaction.NotSupportedException, javax.transaction.SystemException
begin
in interface javax.transaction.TransactionManager
javax.transaction.NotSupportedException
javax.transaction.SystemException
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
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
javax.transaction.SystemException
public void rollback() throws java.lang.IllegalStateException, java.lang.SecurityException, javax.transaction.SystemException
rollback
in interface javax.transaction.TransactionManager
java.lang.IllegalStateException
java.lang.SecurityException
javax.transaction.SystemException
public int getStatus()
getStatus
in interface javax.transaction.TransactionManager
public javax.transaction.Transaction getTransaction()
getTransaction
in interface javax.transaction.TransactionManager
public void resume(javax.transaction.Transaction tx) throws javax.transaction.InvalidTransactionException, java.lang.IllegalStateException, javax.transaction.SystemException
resume
in interface javax.transaction.TransactionManager
javax.transaction.InvalidTransactionException
java.lang.IllegalStateException
javax.transaction.SystemException
public javax.transaction.Transaction suspend()
suspend
in interface javax.transaction.TransactionManager
public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.TransactionManager
java.lang.IllegalStateException
javax.transaction.SystemException
public void setTransactionTimeout(int seconds)
setTransactionTimeout
in interface javax.transaction.TransactionManager
public javax.transaction.Transaction getTransaction(javax.transaction.xa.Xid xid)
TyrexTransactionManager
getTransaction
in interface TyrexTransactionManager
xid
- The transaction identifier
public javax.transaction.Transaction getTransaction(java.lang.String xid)
TyrexTransactionManager
getTransaction
in interface TyrexTransactionManager
xid
- The transaction identifier
public void dumpTransactionList(java.io.PrintWriter writer)
TyrexTransactionManager
dumpTransactionList
in interface TyrexTransactionManager
writer
- The writer to usepublic void dumpCurrentTransaction(java.io.PrintWriter writer)
TyrexTransactionManager
dumpCurrentTransaction
in interface TyrexTransactionManager
writer
- The writer to usepublic javax.transaction.Transaction getTransaction(java.lang.Thread thread)
TransactionManager.getTransaction()
from within the thread.
thread
- The thread to lookup
public void enlistResource(javax.transaction.xa.XAResource xaResource) throws javax.transaction.SystemException
TyrexTransactionManager
enlistResource
in interface TyrexTransactionManager
javax.transaction.SystemException
- The resource cannot be enlisted with
the current transactionpublic void enlistResource(javax.transaction.xa.XAResource xaResource, XAResourceCallback callback) throws javax.transaction.SystemException
TyrexTransactionManager
enlistResource
in interface TyrexTransactionManager
callback
- The callback (optional)
javax.transaction.SystemException
- The resource cannot be enlisted with
the current transactionXAResourceCallback
public void delistResource(javax.transaction.xa.XAResource xaResource, int flag)
TyrexTransactionManager
delistResource
in interface TyrexTransactionManager
flag
- The delist flagprotected void internalResume(TransactionImpl tx) throws java.lang.IllegalStateException, javax.transaction.SystemException
java.lang.IllegalStateException
javax.transaction.SystemException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |