Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.geronimo.transaction.context
Class TransactionContextManager  view TransactionContextManager download TransactionContextManager.java

java.lang.Object
  extended byorg.apache.geronimo.transaction.context.TransactionContextManager
All Implemented Interfaces:
javax.resource.spi.XATerminator, org.apache.geronimo.transaction.XAWork

public class TransactionContextManager
extends java.lang.Object
implements javax.resource.spi.XATerminator, org.apache.geronimo.transaction.XAWork

Version:
$Rev: 156292 $ $Date: 2005-03-05 18:48:02 -0800 (Sat, 05 Mar 2005) $

Field Summary
private  java.lang.ThreadLocal CONTEXT
           
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
private  java.util.Map importedTransactions
           
private  org.apache.geronimo.transaction.manager.XidImporter importer
           
private static boolean IN_RECOVERY
           
private static org.apache.commons.logging.Log log
           
private static boolean NOT_IN_RECOVERY
           
private  boolean recoveryState
           
private  org.apache.geronimo.transaction.ExtendedTransactionManager transactionManager
           
 
Constructor Summary
TransactionContextManager()
           
TransactionContextManager(org.apache.geronimo.transaction.ExtendedTransactionManager transactionManager, org.apache.geronimo.transaction.manager.XidImporter importer)
           
 
Method Summary
 void begin(javax.transaction.xa.Xid xid, long txTimeoutMillis)
           
 void commit(javax.transaction.xa.Xid xid, boolean onePhase)
           
 void end(javax.transaction.xa.Xid xid)
           
 void forget(javax.transaction.xa.Xid xid)
           
 TransactionContext getContext()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 int getStatus()
           
 javax.transaction.TransactionManager getTransactionManager()
           
 TransactionContext newBeanTransactionContext(long transactionTimeoutMilliseconds)
           
 TransactionContext newContainerTransactionContext()
           
 TransactionContext newUnspecifiedTransactionContext()
           
 int prepare(javax.transaction.xa.Xid xid)
           
 javax.transaction.xa.Xid[] recover(int flag)
           
 void resumeBeanTransactionContext(TransactionContext context)
           
 void rollback(javax.transaction.xa.Xid xid)
           
 void setContext(TransactionContext transactionContext)
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int timeoutSeconds)
           
 TransactionContext suspendBeanTransactionContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

NOT_IN_RECOVERY

private static final boolean NOT_IN_RECOVERY
See Also:
Constant Field Values

IN_RECOVERY

private static final boolean IN_RECOVERY
See Also:
Constant Field Values

CONTEXT

private java.lang.ThreadLocal CONTEXT

transactionManager

private final org.apache.geronimo.transaction.ExtendedTransactionManager transactionManager

importer

private final org.apache.geronimo.transaction.manager.XidImporter importer

importedTransactions

private final java.util.Map importedTransactions

recoveryState

private boolean recoveryState

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

TransactionContextManager

public TransactionContextManager()

TransactionContextManager

public TransactionContextManager(org.apache.geronimo.transaction.ExtendedTransactionManager transactionManager,
                                 org.apache.geronimo.transaction.manager.XidImporter importer)
Method Detail

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()

setTransactionTimeout

public void setTransactionTimeout(int timeoutSeconds)
                           throws javax.transaction.SystemException

getContext

public TransactionContext getContext()

setContext

public void setContext(TransactionContext transactionContext)

newContainerTransactionContext

public TransactionContext newContainerTransactionContext()
                                                  throws javax.transaction.NotSupportedException,
                                                         javax.transaction.SystemException

newBeanTransactionContext

public TransactionContext newBeanTransactionContext(long transactionTimeoutMilliseconds)
                                             throws javax.transaction.NotSupportedException,
                                                    javax.transaction.SystemException

newUnspecifiedTransactionContext

public TransactionContext newUnspecifiedTransactionContext()

suspendBeanTransactionContext

public TransactionContext suspendBeanTransactionContext()
                                                 throws javax.transaction.SystemException

resumeBeanTransactionContext

public void resumeBeanTransactionContext(TransactionContext context)
                                  throws javax.transaction.SystemException,
                                         javax.transaction.InvalidTransactionException

getStatus

public int getStatus()
              throws javax.transaction.SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws javax.transaction.SystemException

commit

public void commit(javax.transaction.xa.Xid xid,
                   boolean onePhase)
            throws javax.transaction.xa.XAException
Specified by:
commit in interface javax.resource.spi.XATerminator

forget

public void forget(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Specified by:
forget in interface javax.resource.spi.XATerminator

prepare

public int prepare(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Specified by:
prepare in interface javax.resource.spi.XATerminator

recover

public javax.transaction.xa.Xid[] recover(int flag)
                                   throws javax.transaction.xa.XAException
Specified by:
recover in interface javax.resource.spi.XATerminator

rollback

public void rollback(javax.transaction.xa.Xid xid)
              throws javax.transaction.xa.XAException
Specified by:
rollback in interface javax.resource.spi.XATerminator

begin

public void begin(javax.transaction.xa.Xid xid,
                  long txTimeoutMillis)
           throws javax.transaction.xa.XAException,
                  javax.transaction.InvalidTransactionException,
                  javax.transaction.SystemException,
                  org.apache.geronimo.transaction.ImportedTransactionActiveException
Specified by:
begin in interface org.apache.geronimo.transaction.XAWork

end

public void end(javax.transaction.xa.Xid xid)
         throws javax.transaction.xa.XAException,
                javax.transaction.SystemException
Specified by:
end in interface org.apache.geronimo.transaction.XAWork

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()