Package com.arjuna.ats.internal.jts.orbspecific

Examples of com.arjuna.ats.internal.jts.orbspecific.ControlImple


            final TransactionImple txImple = (TransactionImple) subordinateTransaction;
            final ControlWrapper controlWrapper = txImple.getControlWrapper();
            if (controlWrapper == null) {
                return;
            }
            final ControlImple controlImple = controlWrapper.getImple();
            if (controlImple == null) {
                return;
            }
            final ArjunaTransactionImple arjunaTransactionImple = controlImple.getImplHandle();
            if (arjunaTransactionImple == null) {
                return;
            }
            logger.debug("Applying a JTS hack to setControlHandle " + controlImple + " on subordinate tx " + subordinateTransaction);
            arjunaTransactionImple.setControlHandle(controlImple);
View Full Code Here


         * If it doesn't have one, then generate an error.
         */

        _currentTransaction = (ArjunaTransactionImple) _currentTransaction.parent();

        ControlImple control = _currentTransaction.getControlHandle();

        if (control != null)
        {
          _parentCoordHandle = control.get_coordinator();

          control = null;

          o = TwoPhaseOutcome.FINISH_OK;
        }
View Full Code Here

    public static void destroyControl (Control control) throws ActiveTransaction, ActiveThreads, BadControl, Destroyed, SystemException
    {
  if (control == null)
      throw new BadControl();
 
  ControlImple lCont = Helper.localControl(control);

  if (lCont != null)
  {
      destroyControl(lCont);
  }
View Full Code Here

      throw new BAD_PARAM();
    else
    {
      try
      {
        ControlImple ctx = null;

        synchronized (ServerControl.allServerControls)
        {
          ctx = (ServerControl) ServerControl.allServerControls.get(uid);
        }

        /*
         * If it's not present then check each element's savingUid just
         * in case that is being used instead of the transaction id.
         * This is because a server transaction actually has two names:
         *
         * (i) the tid it pretends to be (ii) the tid it actually is and
         * saves its intentions list in.
         *
         * Don't bother synchronizing since the hash table is
         * synchronized anyway, and we're not bothered if new items go
         * in while we're looking. If the element we're looking for
         * isn't there now it won't be there at all.
         */

        if (ctx == null)
        {
          Enumeration e = ServerControl.allServerControls.elements();

          while (e.hasMoreElements())
          {
            ctx = (ServerControl) e.nextElement();

            if (ctx.getImplHandle().getSavingUid().equals(uid))
            {
              break;
            }
          }
        }

        if (ctx != null)
          return ctx.getImplHandle().get_status();
        else
          throw new NoTransaction();
      }
      catch (NoTransaction ex)
      {
View Full Code Here

     * run an explicit garbage collection phase for finished hierarchies.
     */

public synchronized ControlImple setupHierarchy (PropagationContext context) throws SystemException
    {
  ControlImple controlPtr = null;
  Uid theUid = null;
  InterposedHierarchy proxyAction = null;

  if (context.parents.length == 0)
      theUid = Utility.otidToUid(context.current.otid);
View Full Code Here

     * run an explicit garbage collection phase for finished hierarchies.
     */

public synchronized ControlImple setupHierarchy (PropagationContext context) throws SystemException
    {
  ControlImple controlPtr = null;
  Uid theUid = null;
  InterposedHierarchy proxyAction = null;

  if (context.parents.length == 0)
      theUid = Utility.otidToUid(context.current.otid);
View Full Code Here

   * Map otid to a Uid.
   */
   
  Uid theUid = OTIDMap.find(context.current.otid);
  InterposedHierarchy proxyAction = present(theUid);
  ControlImple controlPtr = null;
 
  if (proxyAction == null)
  {
      /*
       * Create a new proxyAction element and return the "current" transaction.
View Full Code Here

    TransactionFactoryImple _localFactory = OTSImpleManager.factory();

    try
    {
      ControlImple cont = _localFactory.recreateLocal(ctx);
      CurrentImple current = OTSImpleManager.current();

      /*
       * If this thread is associated with any transactions, then they
       * will be lost in favour of this new hierarchy, unless we have
View Full Code Here

    public static void destroyControl (Control control) throws ActiveTransaction, ActiveThreads, BadControl, Destroyed, SystemException
    {
  if (control == null)
      throw new BadControl();
 
  ControlImple lCont = Helper.localControl(control);

  if (lCont != null)
  {
      destroyControl(lCont);
  }
View Full Code Here

  boolean isError = false;
   
  try
  {
      ControlImple curr = which.getParentImple();
      Stack hier = new Stack();

      while (curr != null)
      {
    hier.push(new ControlWrapper(curr));

    curr = curr.getParentImple();
      }

      try
      {
    ControlWrapper wrapper = (ControlWrapper) hier.pop();
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jts.orbspecific.ControlImple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.