Package org.jamesii.core.experiments

Examples of org.jamesii.core.experiments.ComputationSetupException


        try {
          // Initialize simulation run
          initCompTask = init();

          if (initCompTask == null) {
            throw new ComputationSetupException(
                "Computation task init process failed");
          }
          currentResult = initCompTask.getRunInfo();

          // Notify submitting experiment
View Full Code Here


    List<RunInformation> runInfo = null;
    try {
      runInfo = setupTaskConfig(taskConfig);
      if (!scheduleNewJobs(taskConfig, runInfo)) {
        throw new ComputationSetupException(
            "For the task "
                + taskConfig
                + " the runner was not able to setup a single execution as the replication number estimated was 0.");
      }
    } catch (Exception t) {
View Full Code Here

          "Have you used a schema like \"rmi://localhost:"
              + MasterServer.DEFAULT_PORT + "/"
              + MasterServer.DEFAULT_BINDING_NAME + "\" ???", e);
      emergency = true;
      // addEvent("Exception occured while trying to connect to the server. Client is shutting down. Check the server adress.");
      throw new ComputationSetupException(
          "Exception occured while connecting to the server. Shutting down.", e);
    }
    // make myself known to the server

    SimSystem.report(Level.INFO, "Simulation client " + getName()
        + " tries to register at the server!");

    boolean registered = false;
    int tries = 0;
    while (!registered && (tries < 3)) {
      try {
        tries++;
        server.register(this);
        registered = true;
      } catch (RemoteException e) {

        if (tries < 3) {
          SimSystem.report(Level.WARNING,
              "Attempting to connect to server failed (Try: " + tries + ")");
          try {
            // wait at least a second, and at most 3 seconds - thereby
            // distributing wait times (to avoid further conflicts by two many
            // concurrent accesses)
            this.wait(1000 + Math.round(Math.random() * 2000));
          } catch (InterruptedException e1) {
          }
        } else {
          SimSystem.report(Level.SEVERE, "Failed on connecting to server!");
          SimSystem.report(e);
          emergency = true;
          // addEvent("unspecified exception occured attempting to register at the server");
          throw new ComputationSetupException(
              "Exception occured while registering at the server. Shutting down.",
              e);
        }
      }

View Full Code Here

TOP

Related Classes of org.jamesii.core.experiments.ComputationSetupException

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.