Package com.arjuna.ats.internal.jts.resources

Examples of com.arjuna.ats.internal.jts.resources.SynchronizationRecord


                  // Synchronizations should be stored (or at least iterated) in their natural order
                  _synchs = new TreeSet();
              }
          }

          SynchronizationRecord otsSync;

          if(sync._is_a(JTAInterposedSynchronizationHelper.id()))
          {
              otsSync = new SynchronizationRecord(sync, true);
          }
          else
          {
              otsSync = new SynchronizationRecord(sync);
          }

          // disallow addition of Synchronizations that would appear
          // earlier in sequence than any that has already been called
          // during the pre-commmit phase. This is required for
View Full Code Here


       * Regardless of failures, we must tell all synchronizations what
       * happened.
       */
      while(!stack.isEmpty())
      {
        SynchronizationRecord value = (SynchronizationRecord)stack.pop();
        Synchronization c = value.contents();

        try
        {
          c.after_completion(myStatus);
        }
View Full Code Here

                        // Synchronizations should be stored (or at least iterated) in their natural order
            _synchs = new TreeSet();
                    }
        }

                SynchronizationRecord otsSync;

                if(sync._is_a(JTAInterposedSynchronizationHelper.id()))
                {
                    otsSync = new SynchronizationRecord(sync, true);
                }
                else
                {
                    otsSync = new SynchronizationRecord(sync);
                }

                // disallow addition of Synchronizations that would appear
        // earlier in sequence than any that has already been called
        // during the pre-commmit phase. This is required for
View Full Code Here

       * Regardless of failures, we must tell all synchronizations what
       * happened.
       */
      while(!stack.isEmpty())
      {
        SynchronizationRecord value = (SynchronizationRecord)stack.pop();
        Synchronization c = value.contents();

        try
        {
          c.after_completion(myStatus);
        }
View Full Code Here

        {
          if (_synchs == null)
            _synchs = new HashList(10);
        }

        SynchronizationRecord otsSync = new SynchronizationRecord(sync);

        if (!_synchs.add(otsSync))
        {
          otsSync = null;
          throw new UNKNOWN(ExceptionCodes.ADD_FAILED,
View Full Code Here

     */

    if (_synchs != null)
    {
      HashListIterator iterator = new HashListIterator(_synchs);
      SynchronizationRecord value = (SynchronizationRecord) iterator.iterate();
      boolean doSuspend = false;
      ControlWrapper cw = null;

      try
      {
        /*
         * Make sure that this transaction is active on the thread
         * before we invoke any Synchronizations. They are
         * TransactionalObjects and must have the context flowed to
         * them.
         */

        try
        {
          //        cw = OTSImpleManager.systemCurrent().getControlWrapper();

          cw = OTSImpleManager.current().getControlWrapper();

          /*
           * If there's no transaction incoming, then use the one that
           * we got at creation time.
           */

          if ((cw == null) || (!controlHandle.equals(cw.getImple())))
          {
            //      OTSImpleManager.systemCurrent().resumeImple(controlHandle);

            OTSImpleManager.current().resumeImple(controlHandle);

            doSuspend = true;
          }
        }
        catch (Exception ex)
        {
          /*
           * It should be OK to continue with the invocations even if
           * we couldn't resume, because a Synchronization is only
           * supposed to be associated with a single transaction. So,
           * it should be able to infer the transaction.
           */
        }

        while (value != null)
        {
          Synchronization c = value.contents();

          c.before_completion();

          value = (SynchronizationRecord) iterator.iterate();
        }
View Full Code Here

    SystemException exp = null;

    if (_synchs != null)
    {
      HashListIterator iterator = new HashListIterator(_synchs);
      SynchronizationRecord value = (SynchronizationRecord) iterator.iterate();
      ControlWrapper cw = null;
      boolean doSuspend = false;

      try
      {
        //    cw = OTSImpleManager.systemCurrent().getControlWrapper();

        cw = OTSImpleManager.current().getControlWrapper();

        /*
         * If there isn't a transaction context shipped, then use the
         * one we had during creation.
         */

        if ((cw == null) || (!controlHandle.equals(cw.getImple())))
        {
          //        OTSImpleManager.systemCurrent().resumeImple(controlHandle);

          OTSImpleManager.current().resumeImple(controlHandle);

          doSuspend = true;
        }
      }
      catch (Exception ex)
      {
        /*
         * It should still be OK to make the call without a context
         * because a Synchronization can only be associated with a
         * single transaction.
         */

        problem = true;
      }

      /*
       * Regardless of failures, we must tell all synchronizations what
       * happened.
       */

      while (value != null)
      {
        Synchronization c = value.contents();

        try
        {
          c.after_completion(myStatus);
        }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jts.resources.SynchronizationRecord

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.