org.apache.geronimo.transaction.manager
Class TransactionImpl
java.lang.Object
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.
TransactionImpl
public TransactionImpl(Xid xid,
TransactionLog txLog)
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.