org.apache.geronimo.transaction.context
Class BeanTransactionContext

java.lang.Object
  extended byorg.apache.geronimo.transaction.context.AbstractTransactionContext
      extended byorg.apache.geronimo.transaction.context.InheritableTransactionContext
          extended byorg.apache.geronimo.transaction.context.BeanTransactionContext
All Implemented Interfaces:
TransactionContext

class BeanTransactionContext
extends InheritableTransactionContext

Version:
$Rev: 155839 $ $Date: 2005-03-01 18:30:08 -0500 (Tue, 01 Mar 2005) $

Field Summary
protected static Log log
           
protected  java.util.Map managedConnections
           
private  UnspecifiedTransactionContext oldContext
           
 
Constructor Summary
(package private) BeanTransactionContext(ExtendedTransactionManager txnManager, UnspecifiedTransactionContext oldContext)
           
 
Method Summary
 void associate(InstanceContext context)
           
(package private)  void begin(long transactionTimeoutMilliseconds)
           
 InstanceContext beginInvocation(InstanceContext context)
           
 boolean commit()
           
 boolean delistResource(javax.transaction.xa.XAResource xaResource, int flag)
           
 void endInvocation(InstanceContext caller)
           
 boolean enlistResource(javax.transaction.xa.XAResource xaResource)
           
 void flushState()
           
protected  java.util.ArrayList getAssociatedContexts()
           
 InstanceContext getContext(java.lang.Object containerId, java.lang.Object id)
           
 org.tranql.cache.InTxCache getInTxCache()
           
 java.lang.Object getManagedConnectionInfo(ConnectionReleaser key)
           
(package private)  UnspecifiedTransactionContext getOldContext()
           
 boolean getRollbackOnly()
           
 javax.transaction.Transaction getTransaction()
           
 boolean isActive()
           
 boolean isInheritable()
           
(package private)  boolean isThreadAssociated()
           
 void registerSynchronization(javax.transaction.Synchronization synchronization)
           
 void resume()
           
 void rollback()
           
 void setInTxCache(org.tranql.cache.InTxCache inTxCache)
           
 void setManagedConnectionInfo(ConnectionReleaser key, java.lang.Object info)
           
(package private)  void setOldContext(UnspecifiedTransactionContext oldContext)
           
 void setRollbackOnly()
           
 void suspend()
           
 void unassociate(InstanceContext context)
           
 void unassociate(java.lang.Object containerId, java.lang.Object id)
           
protected  void unassociateAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oldContext

private UnspecifiedTransactionContext oldContext

log

protected static final Log log

managedConnections

protected java.util.Map managedConnections
Constructor Detail

BeanTransactionContext

BeanTransactionContext(ExtendedTransactionManager txnManager,
                       UnspecifiedTransactionContext oldContext)
Method Detail

getOldContext

UnspecifiedTransactionContext getOldContext()

setOldContext

void setOldContext(UnspecifiedTransactionContext oldContext)

begin

void begin(long transactionTimeoutMilliseconds)
     throws javax.transaction.SystemException,
            javax.transaction.NotSupportedException
Throws:
javax.transaction.SystemException
javax.transaction.NotSupportedException

isThreadAssociated

boolean isThreadAssociated()

getTransaction

public javax.transaction.Transaction getTransaction()

isInheritable

public boolean isInheritable()

isActive

public boolean isActive()

enlistResource

public boolean enlistResource(javax.transaction.xa.XAResource xaResource)
                       throws javax.transaction.RollbackException,
                              javax.transaction.SystemException
Throws:
javax.transaction.RollbackException
javax.transaction.SystemException

delistResource

public boolean delistResource(javax.transaction.xa.XAResource xaResource,
                              int flag)
                       throws javax.transaction.SystemException
Throws:
javax.transaction.SystemException

registerSynchronization

public void registerSynchronization(javax.transaction.Synchronization synchronization)
                             throws javax.transaction.RollbackException,
                                    javax.transaction.SystemException
Throws:
javax.transaction.RollbackException
javax.transaction.SystemException

getRollbackOnly

public boolean getRollbackOnly()
                        throws javax.transaction.SystemException
Throws:
javax.transaction.SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException,
                            javax.transaction.SystemException
Throws:
java.lang.IllegalStateException
javax.transaction.SystemException

suspend

public void suspend()
             throws javax.transaction.SystemException
Throws:
javax.transaction.SystemException

resume

public void resume()
            throws javax.transaction.SystemException,
                   javax.transaction.InvalidTransactionException
Throws:
javax.transaction.SystemException
javax.transaction.InvalidTransactionException

commit

public boolean commit()
               throws javax.transaction.HeuristicMixedException,
                      javax.transaction.HeuristicRollbackException,
                      javax.transaction.SystemException,
                      javax.transaction.RollbackException
Throws:
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
javax.transaction.SystemException
javax.transaction.RollbackException

rollback

public void rollback()
              throws javax.transaction.SystemException
Throws:
javax.transaction.SystemException

associate

public final void associate(InstanceContext context)
                     throws java.lang.Throwable
Specified by:
associate in interface TransactionContext
Throws:
java.lang.Throwable

unassociate

public final void unassociate(InstanceContext context)
                       throws java.lang.Throwable
Specified by:
unassociate in interface TransactionContext
Throws:
java.lang.Throwable

unassociate

public final void unassociate(java.lang.Object containerId,
                              java.lang.Object id)
                       throws java.lang.Throwable
Specified by:
unassociate in interface TransactionContext
Throws:
java.lang.Throwable

getContext

public final InstanceContext getContext(java.lang.Object containerId,
                                        java.lang.Object id)
Specified by:
getContext in interface TransactionContext

getAssociatedContexts

protected final java.util.ArrayList getAssociatedContexts()

unassociateAll

protected final void unassociateAll()

beginInvocation

public final InstanceContext beginInvocation(InstanceContext context)
                                      throws java.lang.Throwable
Specified by:
beginInvocation in interface TransactionContext
Throws:
java.lang.Throwable

endInvocation

public final void endInvocation(InstanceContext caller)
Specified by:
endInvocation in interface TransactionContext

flushState

public final void flushState()
                      throws java.lang.Throwable
Specified by:
flushState in interface TransactionContext
Throws:
java.lang.Throwable

setInTxCache

public final void setInTxCache(org.tranql.cache.InTxCache inTxCache)
Specified by:
setInTxCache in interface TransactionContext

getInTxCache

public final org.tranql.cache.InTxCache getInTxCache()
Specified by:
getInTxCache in interface TransactionContext

setManagedConnectionInfo

public void setManagedConnectionInfo(ConnectionReleaser key,
                                     java.lang.Object info)
Specified by:
setManagedConnectionInfo in interface TransactionContext

getManagedConnectionInfo

public java.lang.Object getManagedConnectionInfo(ConnectionReleaser key)
Specified by:
getManagedConnectionInfo in interface TransactionContext


Copyright © 2005 Apache Software Foundation. All Rights Reserved.