Package com.arjuna.mw.wsas.exceptions

Examples of com.arjuna.mw.wsas.exceptions.WrongStateException


        }
        catch (InvalidActivityException ex)
        {
          _status = Completed.instance();

          throw new WrongStateException(ex.toString());
        }

        if (_timeout > 0)
        {
          if (!ActivityReaper.activityReaper(true).insert(this, _timeout))
          {
            setCompletionStatus(FailureOnly.instance());
          }
        }

        _status = Active.instance();
      }
      else
        throw new WrongStateException(
            wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_1")
                + " " + this + " " + _status);
    }
  }
View Full Code Here


          return _result;
        else
        {
          // we can't have terminated yet!

          throw new WrongStateException(
              wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_3")
                  + " " + _status);
        }
      }
    }
View Full Code Here

        completionValid(endStatus);

        _completionStatus = endStatus;
      }
      else
        throw new WrongStateException(
            wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_4")
                + " " + this + " " + _status);
    }
  }
View Full Code Here

      throws WrongStateException
  {
    if (!_completionStatus.equals(cs))
    {
      if (_completionStatus.equals(FailureOnly.instance()))
        throw new WrongStateException(
            wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_5")
                + " " + _completionStatus + " " + cs);
    }
  }
View Full Code Here

      if (_status.equals(Active.instance()))
      {
        _children.put(child.getGlobalId(), child);
      }
      else
        throw new WrongStateException(
            wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_7")
                + " " + _status);
    }
  }
View Full Code Here

          throw new InvalidActivityException(
              wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_9")
                  + child);
      }
      else
        throw new WrongStateException(
            wsasLogger.log_mesg.getString("com.arjuna.mwlabs.wsas.activity.ActivityImple_10")
                + _status);
    }
  }
View Full Code Here

      _status = Prepared.instance();
     
      return new VoteCommit();
  }
  else
      throw new WrongStateException();
    }
View Full Code Here

    public void commit (Qualifier[] qualifiers) throws SystemException, InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, HeuristicRollbackException
    {
  System.out.println("DemoParticipant.commit ( "+_id+" )");

  if (!_status.equals(Prepared.instance()))
      throw new WrongStateException();
  else
  {
      _status = Committed.instance();

      _passed = true;
View Full Code Here

    public void commitOnePhase (Qualifier[] qualifiers) throws SystemException, InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, HeuristicRollbackException
    {
  System.out.println("DemoParticipant.commitOnePhase ( "+_id+" )");

  if (_status.equals(Prepared.instance()))
      throw new WrongStateException();
  else
  {
      _status = Committed.instance();

      _passed = true;
View Full Code Here

    {
  System.out.println("DemoParticipant.rollback ( "+_id+" )");

  if (!_status.equals(Prepared.instance()) || !_status.equals(Active.instance()))
  {
      throw new WrongStateException();
  }
  else
      _status = RolledBack.instance();
    }
View Full Code Here

TOP

Related Classes of com.arjuna.mw.wsas.exceptions.WrongStateException

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.