1 17 18 package org.apache.geronimo.transaction.context; 19 20 import javax.transaction.HeuristicMixedException ; 21 import javax.transaction.HeuristicRollbackException ; 22 import javax.transaction.InvalidTransactionException ; 23 import javax.transaction.RollbackException ; 24 import javax.transaction.Synchronization ; 25 import javax.transaction.SystemException ; 26 import javax.transaction.xa.XAResource ; 27 28 import org.apache.geronimo.transaction.ConnectionReleaser; 29 import org.apache.geronimo.transaction.InstanceContext; 30 import org.tranql.cache.InTxCache; 31 32 33 36 public interface TransactionContext { 37 boolean isInheritable(); 38 39 boolean isActive(); 40 41 boolean enlistResource(XAResource xaResource) throws RollbackException , SystemException ; 42 43 boolean delistResource(XAResource xaResource, int flag) throws SystemException ; 44 45 void registerSynchronization(Synchronization synchronization) throws RollbackException , SystemException ; 46 47 boolean getRollbackOnly() throws SystemException ; 48 49 void setRollbackOnly() throws SystemException ; 50 51 void suspend() throws SystemException ; 52 53 void resume() throws SystemException , InvalidTransactionException ; 54 55 boolean commit() throws HeuristicMixedException , HeuristicRollbackException , RollbackException , SystemException ; 56 57 void rollback() throws SystemException ; 58 59 void associate(InstanceContext context) throws Throwable ; 60 61 void unassociate(InstanceContext context) throws Throwable ; 62 63 void unassociate(Object containerId, Object id) throws Throwable ; 64 65 InstanceContext getContext(Object containerId, Object id); 66 67 InstanceContext beginInvocation(InstanceContext context) throws Throwable ; 68 69 void endInvocation(InstanceContext caller); 70 71 void flushState() throws Throwable ; 72 73 void setInTxCache(InTxCache inTxCache); 74 75 InTxCache getInTxCache(); 76 77 void setManagedConnectionInfo(ConnectionReleaser key, Object info); 78 79 Object getManagedConnectionInfo(ConnectionReleaser key); 80 } | Popular Tags |