if (!findListener(appServer, name)) haveNewNodes = true;
AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); if (desc != null && desc.hostName.equals(appServerDesc.hostName) && desc.remotePort == appServerDesc.remotePort) continue; else if (!findListener(appServer, name)) haveNewNodes = true;
  private boolean updateNodeToAppServerMapping() {    System.out.println("Updating app servers");    boolean haveNewNodes = false;    // get process descriptions from all known app servers    // and store info in a new hashtable    Hashtable newNodeToAppServer = new Hashtable();    for (int i = 0; i < appServers.size(); i++) {      AppServerDesc appServerDesc = (AppServerDesc)appServers.get(i);      RemoteHost appServer = appServerDesc.appServer;      java.util.List someNodes = null;      try {        someNodes = appServer.listProcessDescriptions();      } catch (Exception e) {        if (log.isErrorEnabled()) {          log.error("Exception getting info from app server: " + e);        }      }      if (someNodes != null) {        for (Iterator j = someNodes.iterator(); j.hasNext(); ) {          ProcessDescription pd = (ProcessDescription)j.next();          String name = pd.getName();          System.out.println("Adding app server for: " + name +                             " " + appServerDesc);          newNodeToAppServer.put(name, appServerDesc);          if (!findListener(appServer, name))            haveNewNodes = true;        }      }    }    nodeToAppServer = newNodeToAppServer; // set new mapping    return haveNewNodes;  }