org.apache.geronimo.transaction.manager
Class TransactionImpl

java.lang.Object
  extended by org.apache.geronimo.transaction.manager.TransactionImpl
All Implemented Interfaces:
Transaction

public class TransactionImpl
extends Object
implements Transaction

Basic local transaction with support for multiple resources.


Constructor Summary
TransactionImpl(Xid xid, TransactionLog txLog)
           
 
Method Summary
 org.apache.geronimo.transaction.manager.TransactionImpl.TransactionBranch addBranchXid(XAResource xaRes, Xid branchId)
           
 void commit()
           
 boolean delistResource(XAResource xaRes, int flag)
           
 boolean enlistResource(XAResource xaRes)
           
 boolean equals(Object obj)
           
 Object getEntityManager(String persistenceUnit)
           
 Object getResource(Object key)
           
 boolean getRollbackOnly()
           
 int getStatus()
           
 Object getTransactionKey()
           
 int getTransactionStatus()
           
 void putResource(Object key, Object value)
           
 void registerInterposedSynchronization(Synchronization synchronization)
           
 void registerSynchronization(Synchronization synch)
           
 void rollback()
           
 void setEntityManager(String persistenceUnit, Object entityManager)
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionImpl

public TransactionImpl(Xid xid,
                       TransactionLog txLog)
Method Detail

getStatus

public int getStatus()
Specified by:
getStatus in interface Transaction

getResource

public Object getResource(Object key)

getRollbackOnly

public boolean getRollbackOnly()

getTransactionKey

public Object getTransactionKey()

getTransactionStatus

public int getTransactionStatus()

putResource

public void putResource(Object key,
                        Object value)

registerInterposedSynchronization

public void registerInterposedSynchronization(Synchronization synchronization)

setRollbackOnly

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

registerSynchronization

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

enlistResource

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

delistResource

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

commit

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

rollback

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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

addBranchXid

public org.apache.geronimo.transaction.manager.TransactionImpl.TransactionBranch addBranchXid(XAResource xaRes,
                                                                                              Xid branchId)

getEntityManager

public Object getEntityManager(String persistenceUnit)

setEntityManager

public void setEntityManager(String persistenceUnit,
                             Object entityManager)


Copyright © 2006 Apache Software Foundation. All Rights Reserved.