Class ContextManager

java.lang.Object
com.arjuna.ats.internal.jts.context.ContextManager

public class ContextManager extends Object
This class is responsible for managing the thread-to-transaction context mappings.
Since:
JTS 1.0.
Version:
$Id: ContextManager.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)
  • Constructor Details

    • ContextManager

      public ContextManager()
  • Method Details

    • current

      public com.arjuna.ats.internal.jts.ControlWrapper current(String threadId) throws org.omg.CORBA.SystemException
      Get the current transaction associated with the invoking thread. Do not look in the PI thread data. Does not need to be synchronized since it is implicitly single-threaded.
      Returns:
      the context.
      Throws:
      org.omg.CORBA.SystemException
    • current

      public com.arjuna.ats.internal.jts.ControlWrapper current() throws org.omg.CORBA.SystemException
      Get the transaction for the invoking thread. If there isn't one in the normal thread associated data then look in the PI implementation.
      Returns:
      the current transaction for the invoking thread.
      Throws:
      org.omg.CORBA.SystemException
    • popAction

      public final com.arjuna.ats.internal.jts.ControlWrapper popAction(String threadId)
    • popAction

      public final com.arjuna.ats.internal.jts.ControlWrapper popAction()
    • purgeActions

      public final void purgeActions(String threadId)
    • purgeActions

      public final void purgeActions()
    • associate

      public void associate() throws org.omg.CORBA.SystemException
      Force the thread-to-transaction association. Applications should not use this method.
      Throws:
      org.omg.CORBA.SystemException
      Since:
      JTS 2.1.1.
    • addRemoteHierarchy

      public final boolean addRemoteHierarchy(Control cont)
      We could maintain a list of suspended action hierarchies and resume the right one (and the right place!) given the control. However, this can lead to memory leaks, since we never know when to remove this hierarchy information. So, for now we simply rely on the propagation context.
    • addActionControlHierarchy

      public final boolean addActionControlHierarchy(ActionControl cont)
    • addControlImpleHierarchy

      public final boolean addControlImpleHierarchy(ControlImple which)
    • pushAction

      public final void pushAction(com.arjuna.ats.internal.jts.ControlWrapper action)
      If we have a hierarchy of remote actions (controls) then they will not be registered with BasicAction. Also, they will either all be remote references to controls, or all but the current action will be proxy/wrapper controls, i.e., controls which contain references to the remote coordinator/terminator.
    • currentPIContext

      public com.arjuna.ats.internal.jts.ControlWrapper currentPIContext() throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • createProxy

      public final com.arjuna.ats.internal.jts.ControlWrapper createProxy(org.omg.CORBA.Any ctx) throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • createHierarchy

      public final com.arjuna.ats.internal.jts.ControlWrapper createHierarchy(org.omg.CORBA.Any ctx) throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • disassociateContext

      public final void disassociateContext(int slotId) throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • getReceivedCoordinatorUid

      public Uid getReceivedCoordinatorUid() throws org.omg.PortableInterceptor.InvalidSlot
      Throws:
      org.omg.PortableInterceptor.InvalidSlot