Пример #1
0
  protected void preExecExertion(Exertion exertion) throws ExertionException {
    try {
      exertion
          .getControlContext()
          .appendTrace(provider.getProviderName() + " dispatcher: " + getClass().getName());

      ExertionSessionInfo.add((ServiceExertion) exertion);
      // Provider is expecting exertion field in Context to be set.
      xrt.getContext().setExertion(xrt);
      updateInputs(exertion);
    } catch (Exception e) {
      throw new ExertionException(e);
    }
    ((ServiceExertion) exertion).startExecTime();
    ((ServiceExertion) exertion).setStatus(RUNNING);
  }
Пример #2
0
  protected void postExecExertion(Exertion result) throws ExertionException {
    ServiceExertion sxrt = (ServiceExertion) result;
    if (sxrt instanceof NetJob)
      ((NetJob) xrt).setExertionAt(result, ((ServiceExertion) result).getIndex());
    else xrt = sxrt;
    try {
      if (sxrt.getStatus() > ERROR && sxrt.getStatus() != SUSPENDED) {
        sxrt.setStatus(DONE);
        collectOutputs(result);
      }
    } catch (Exception e) {
      throw new ExertionException(e);
    }
    if (sxrt.getStatus() != DONE) state = sxrt.getStatus();

    xrt.stopExecTime();
    dispatchers.remove(xrt.getId());
    ExertionSessionInfo.removeLease();
    dThread.stop = true;
  }