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

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


  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


         * 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

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

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

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

  if (control instanceof ControlImple)
  {
      try
      {
    ControlImple c = (ControlImple) control;
   
    return (BasicAction) c.getImplHandle();
      }
      catch (Exception e)
      {
      }
  }
View Full Code Here

      UidCoordinator uidCoord = Helper.getUidCoordinator(control);

      if (uidCoord != null)
      {
    Uid u = Helper.getUid(uidCoord);
    ControlImple toReturn = null;

    uidCoord = null;

    /*
      * allControls only contains local controls.
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 ControlImple recreateLocal (PropagationContext ctx, int formatID)
      throws SystemException
  {
    ControlImple toReturn = null;

    FactoryElement ptr = find(formatID);

    if (ptr != null)
    {
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

     * allControls only contains local controls. Have we seen this
     * transaction before, i.e., is it a locally created transaction that we
     * are re-importing?
     */

    ControlImple cont = ((ControlImple.allControls != null) ? (ControlImple) ControlImple.allControls.get(actUid)
        : null);

    /*
     * We could do optimisations based on whether this is a transaction we
     * have locally created anyway and somehow it is being re-imported. If
     * that is the case, then why create a new transaction to manage it -
     * this will only add to the disk access? However, currently we cannot
     * do this optimisation because:
     *
     * (i) if the original control is being terminated from a remote
     * process, it will not be able to force thread-to-transaction
     * association (ArjunaTransactionImple et al don't do that.)
     *
     * (ii) certain AIT records require thread-to-transaction association in
     * order to work (e.g., LockRecord).
     *
     * What this means is that if we do this optimisation and an application
     * uses AIT, all AIT records will be added to the parent (original)
     * transaction and not the interposed transaction (which does do
     * thread-to-transaction association - or the resource does). Then when
     * the transaction is terminated, these records will be processed and
     * they will not be able to determine the current transaction.
     */

    if (cont != null)
    {
      _isWrapper = true;
      _transactionHandle = cont.getImplHandle();

      Coordinator coord = null;
      Terminator term = null;

      try
      {
        coord = cont.get_coordinator();
        term = cont.get_terminator();
      }
      catch (Exception e)
      {
        e.printStackTrace();

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

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.