站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 transaction API Documentation 英文版文档

TransactionImpl (JBoss Transaction API) - JBoss 4.0.1 sp1 transaction API Documentation 英文版文档


org.jboss.tm
Class TransactionImpl

java.lang.Object
  extended byorg.jboss.tm.TransactionImpl
All Implemented Interfaces:
org.jboss.util.timeout.TimeoutTarget, Transaction

public class TransactionImpl
extends Object
implements Transaction, org.jboss.util.timeout.TimeoutTarget

Our Transaction implementation.

Version:
$Revision: 1.35 $
Author:
Rickard 脙聳berg, Marc Fleury, Ole Husgaard, Toby Allsopp, Jason Dillon, David Jencks, Bill Burke, Adrian Brock
See Also:
TxManager

Method Summary
 void associateCurrentThread()
           
 void commit()
           
 boolean delistResource(XAResource xaRes, int flag)
           
 void disassociateCurrentThread()
           
 boolean enlistResource(XAResource xaRes)
           
 boolean equals(Object obj)
           
 GlobalId getGlobalId()
          Returns the global id of this transaction.
 LocalId getLocalId()
          Returns the local id of this transaction.
 long getLocalIdValue()
          Returns the local id of this transaction.
 int getStatus()
           
 long getTimeLeftBeforeTimeout()
           
 XidImpl getXid()
          Returns the xid of this transaction.
 int hashCode()
           
 void registerSynchronization(Synchronization s)
           
 void rollback()
           
 void setRollbackOnly()
           
 void timedOut(org.jboss.util.timeout.Timeout timeout)
          Called when our timeout expires.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

timedOut

public void timedOut(org.jboss.util.timeout.Timeout timeout)
Called when our timeout expires.

Specified by:
timedOut in interface org.jboss.util.timeout.TimeoutTarget

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Specified by:
commit in interface Transaction
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Specified by:
rollback in interface Transaction
Throws:
IllegalStateException
SecurityException
SystemException

delistResource

public boolean delistResource(XAResource xaRes,
                              int flag)
                       throws IllegalStateException,
                              SystemException
Specified by:
delistResource in interface Transaction
Throws:
IllegalStateException
SystemException

enlistResource

public boolean enlistResource(XAResource xaRes)
                       throws RollbackException,
                              IllegalStateException,
                              SystemException
Specified by:
enlistResource in interface Transaction
Throws:
RollbackException
IllegalStateException
SystemException

getStatus

public int getStatus()
              throws SystemException
Specified by:
getStatus in interface Transaction
Throws:
SystemException

registerSynchronization

public void registerSynchronization(Synchronization s)
                             throws RollbackException,
                                    IllegalStateException,
                                    SystemException
Specified by:
registerSynchronization in interface Transaction
Throws:
RollbackException
IllegalStateException
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Specified by:
setRollbackOnly in interface Transaction
Throws:
IllegalStateException
SystemException

associateCurrentThread

public void associateCurrentThread()

disassociateCurrentThread

public void disassociateCurrentThread()

hashCode

public int hashCode()

toString

public String toString()

equals

public boolean equals(Object obj)

getLocalIdValue

public long getLocalIdValue()
Returns the local id of this transaction. The local id is used as a transaction propagation context within the JBoss server, and in the TxManager for mapping local transaction ids to transactions.


getLocalId

public LocalId getLocalId()
Returns the local id of this transaction. The local id is used as a transaction propagation context within the JBoss server, and in the TxManager for mapping local transaction ids to transactions.


getGlobalId

public GlobalId getGlobalId()
Returns the global id of this transaction. Ths global id is used in the TxManager, which keeps a map from global ids to transactions.


getXid

public XidImpl getXid()
Returns the xid of this transaction.


getTimeLeftBeforeTimeout

public long getTimeLeftBeforeTimeout()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.