Package com.arjuna.mw.wsas.activity

Examples of com.arjuna.mw.wsas.activity.ActivityHierarchy


    {
        try
        {
            ACCoordinator currentCoordinator = (ACCoordinator) param;

            ActivityHierarchy hier = null;
           
            try
            {
                hier = UserActivityFactory.userActivity().currentActivity();
            }
            catch (SystemException ex)
            {
                ex.printStackTrace();
            }

            if ((currentCoordinator != null) && (hier != null))
            {
                /*
                 * Do the manditory stuff first.
                 */

                ActionHierarchy txHier = currentCoordinator.getHierarchy();
                final int depth = txHier.depth() ;
                _identifierValues = new String[depth] ;
                _expiresValues = new int[depth] ;
               
                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;
               
                /*
                 * Now let's do the optional stuff.
                 */

                for(int count = 1, index = 0 ; count < depth ; count++, index++)
                {
                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
                    _expiresValues[count] = hier.activity(index).getTimeout() ;
                }
            }
        }
        catch (ClassCastException ex)
        {
View Full Code Here


  {
    try
    {
      ACCoordinator currentCoordinator = (ACCoordinator) param;
           
      ActivityHierarchy hier = null;

      try
      {
        hier = UserActivityFactory.userActivity().currentActivity();
      }
      catch (SystemException ex)
      {
        ex.printStackTrace();
      }

      if ((currentCoordinator != null) && (hier != null))
      {
        /*
         * Do the manditory stuff first.
         */

        ActionHierarchy txHier = currentCoordinator.getHierarchy();
                final int depth = txHier.depth() ;
                _identifierValues = new String[depth] ;
                _expiresValues = new int[depth] ;
               
                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;
               
        /*
         * Now let's do the optional stuff.
         */
                for(int count = 1, index = 0 ; count < depth ; count++, index++)
                {
                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
                    _expiresValues[count] = hier.activity(index).getTimeout() ;
                }
      }
    }
    catch (ClassCastException ex)
    {
View Full Code Here

      final String protocolIdentifier,
      final InstanceIdentifier instanceIdentifier)
      throws AlreadyRegisteredException, InvalidProtocolException,
      InvalidStateException, NoActivityException
  {
    ActivityHierarchy hier = (ActivityHierarchy) _hierarchies
        .get(instanceIdentifier.getInstanceIdentifier());

    if (hier == null) throw new NoActivityException();

    try
View Full Code Here

  public final void associate () throws Exception
  {
    // TODO colocation won't do suspend

    String txIdentifier = _coordManager.identifier().toString();
    ActivityHierarchy hier = _coordManager.suspend();

    _hierarchies.put(txIdentifier, hier);
  }
View Full Code Here

    Object tx = _hierarchies.get(instanceIdentifier.getInstanceIdentifier());
   
    if (tx instanceof SubordinateCoordinator)
      return registerWithSubordinate((SubordinateCoordinator)tx, participantProtocolService, protocolIdentifier);

    ActivityHierarchy hier = (ActivityHierarchy) tx;

    if (hier == null)
      throw new NoActivityException();

    try
View Full Code Here

  public final void associate () throws Exception
  {
    // TODO colocation won't do suspend

    String txIdentifier = _coordManager.identifier().toString();
    ActivityHierarchy hier = _coordManager.suspend();

    _hierarchies.put(txIdentifier, hier);
  }
View Full Code Here

    {
      try
      {
          ACCoordinator currentCoordinator = (ACCoordinator) param;

          ActivityHierarchy hier = null;

          try
          {
              hier = UserActivityFactory.userActivity().currentActivity();
          }
          catch (SystemException ex)
          {
              ex.printStackTrace();
          }

          if ((currentCoordinator != null) && (hier != null))
          {
            /*
             * Do the manditory stuff first.
             */

            ActionHierarchy txHier = currentCoordinator.getHierarchy();
                final int depth = txHier.depth() ;
                _identifierValues = new String[depth] ;
                _expiresValues = new int[depth] ;

                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;

            /*
             * Now let's do the optional stuff.
             */
                for(int count = 1, index = 0 ; count < depth ; count++, index++)
                {
                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
                    _expiresValues[count] = hier.activity(index).getTimeout() ;
                }
            }
      }
      catch (ClassCastException ex)
      {
View Full Code Here

    {
      try
      {
          ACCoordinator currentCoordinator = (ACCoordinator) param;
   
          ActivityHierarchy hier = null;
     
          try
          {
              hier = UserActivityFactory.userActivity().currentActivity();
          }
          catch (SystemException ex)
          {
              ex.printStackTrace();
          }

          if ((currentCoordinator != null) && (hier != null))
          {
            /*
             * Do the manditory stuff first.
             */
       
            ActionHierarchy txHier = currentCoordinator.getHierarchy();
                final int depth = txHier.depth() ;
                _identifierValues = new String[depth] ;
                _expiresValues = new int[depth] ;
               
                _identifierValues[0] = txHier.getDeepestActionUid().stringForm() ;
                _expiresValues[0] = hier.activity(hier.size()-1).getTimeout() ;
             
            /*
             * Now let's do the optional stuff.
             */
                for(int count = 1, index = 0 ; count < depth ; count++, index++)
                {
                    _identifierValues[count] = txHier.getActionUid(index).stringForm() ;
                    _expiresValues[count] = hier.activity(index).getTimeout() ;
                }
            }
      }
      catch (ClassCastException ex)
      {
View Full Code Here

    public Transaction suspend () throws javax.transaction.SystemException
    {
  try
  {
      ActivityHierarchy hier = UserActivityFactory.userActivity().suspend();
      Transaction tx = _coordControl.transaction(hier);

      _transactions.put(tx, hier);

      return tx;
View Full Code Here

    public void resume (Transaction which) throws InvalidTransactionException, java.lang.IllegalStateException, javax.transaction.SystemException
    {
  try
  {
      ActivityHierarchy hier = (ActivityHierarchy) _transactions.get(which);

      if ((which != null) && (hier == null))
    throw new InvalidTransactionException();
     
      UserActivityFactory.userActivity().resume(hier);
View Full Code Here

TOP

Related Classes of com.arjuna.mw.wsas.activity.ActivityHierarchy

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.