org.jboss.tm
Class TxManager
java.lang.Object
|
+--org.jboss.tm.TxManager
- All Implemented Interfaces:
- javax.transaction.TransactionManager
- public class TxManager
- extends java.lang.Object
- implements javax.transaction.TransactionManager
Our TransactionManager implementation.
- Version:
- $Revision: 1.24 $
- Author:
- Rickard Öberg (rickard.oberg@telkel.com), Marc Fleury, Ole Husgaard
- See Also:
Method Summary |
void |
associateThread(javax.transaction.Transaction transaction)
|
void |
begin()
|
void |
commit()
Commit the transaction associated with the currently running thread. |
javax.transaction.Transaction |
disassociateThread()
|
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. |
int |
getTransactionTimeout()
|
void |
resume(javax.transaction.Transaction tobj)
|
void |
rollback()
Roll back the transaction associated with the currently running thread. |
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 here. |
javax.transaction.Transaction |
suspend()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TxManager
public TxManager()
begin
public void begin()
throws javax.transaction.NotSupportedException,
javax.transaction.SystemException
- Specified by:
begin
in interface javax.transaction.TransactionManager
commit
public void commit()
throws javax.transaction.RollbackException,
javax.transaction.HeuristicMixedException,
javax.transaction.HeuristicRollbackException,
java.lang.SecurityException,
java.lang.IllegalStateException,
javax.transaction.SystemException
- Commit the transaction associated with the currently running thread.
- Specified by:
commit
in interface javax.transaction.TransactionManager
getStatus
public int getStatus()
throws javax.transaction.SystemException
- Return the status of the transaction associated with the currently
running thread, or
Status.STATUS_NO_TRANSACTION
if no
active transaction is currently associated.
- Specified by:
getStatus
in interface javax.transaction.TransactionManager
getTransaction
public javax.transaction.Transaction getTransaction()
throws javax.transaction.SystemException
- Return the transaction currently associated with the invoking thread,
or
null
if no active transaction is currently associated.
- Specified by:
getTransaction
in interface javax.transaction.TransactionManager
resume
public void resume(javax.transaction.Transaction tobj)
throws javax.transaction.InvalidTransactionException,
java.lang.IllegalStateException,
javax.transaction.SystemException
- Specified by:
resume
in interface javax.transaction.TransactionManager
suspend
public javax.transaction.Transaction suspend()
throws javax.transaction.SystemException
- Specified by:
suspend
in interface javax.transaction.TransactionManager
rollback
public void rollback()
throws java.lang.IllegalStateException,
java.lang.SecurityException,
javax.transaction.SystemException
- Roll back the transaction associated with the currently running thread.
- Specified by:
rollback
in interface javax.transaction.TransactionManager
setRollbackOnly
public void setRollbackOnly()
throws java.lang.IllegalStateException,
javax.transaction.SystemException
- Mark the transaction associated with the currently running thread
so that the only possible outcome is a rollback.
- Specified by:
setRollbackOnly
in interface javax.transaction.TransactionManager
setTransactionTimeout
public void setTransactionTimeout(int seconds)
throws javax.transaction.SystemException
- Set the transaction timeout for new transactions started here.
- Specified by:
setTransactionTimeout
in interface javax.transaction.TransactionManager
getTransactionTimeout
public int getTransactionTimeout()
disassociateThread
public javax.transaction.Transaction disassociateThread()
associateThread
public void associateThread(javax.transaction.Transaction transaction)
Copyright © 2000 The jBoss Organization. All Rights Reserved.