Exemplo n.º 1
0
 /**
  * Kill the above container. This may be called by the JICPMediatorManager or when a peer
  * termination notification is received.
  */
 public void kill() {
   // Avoid killing the above container two times
   synchronized (shutdownLock) {
     if (active) {
       active = false;
       myContainer.shutDown();
     }
   }
 }
Exemplo n.º 2
0
  protected final BackEndSkel startBackEndContainer(Properties props) throws ICPException {
    try {
      String nodeName = myID.replace(':', '_');
      props.setProperty(Profile.CONTAINER_NAME, nodeName);

      myContainer = new BackEndContainer(props, this);
      if (!myContainer.connect()) {
        throw new ICPException("BackEnd container failed to join the platform");
      }
      // Possibly the node name was re-assigned by the main
      myID = myContainer.here().getName();
      if (myLogger.isLoggable(Logger.CONFIG)) {
        myLogger.log(
            Logger.CONFIG, "BackEndContainer " + myID + " successfully joined the platform");
      }
      return new BackEndSkel(myContainer);
    } catch (ProfileException pe) {
      // should never happen
      pe.printStackTrace();
      throw new ICPException("Error creating profile");
    }
  }