try { node.getRemoteListenable().flushOutput(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("killAllProceses: Exception flushing output for " + name, e);
if (node != null) { try { node.getRemoteListenable().flushOutput(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("killAllProceses: Exception flushing output for " + name, e); }
  private synchronized void killAllProcessesWorker() {    Set names = nodeToAppServer.keySet();    for (Iterator i = names.iterator(); i.hasNext(); ) {      String name = (String)i.next();      AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name);      RemoteHost appServer = desc.appServer;      try {        RemoteProcess node = appServer.getRemoteProcess(name);	try {	  node.getRemoteListenable().flushOutput();	} catch (Exception e) {	  if (log.isWarnEnabled()) {	    log.warn("killAllProceses: Exception flushing output for " + name, e);	  }	}	if (log.isDebugEnabled()) {	  log.debug("About to kill process " + name);	}	node.destroy();      } catch (Exception e) {        if (log.isErrorEnabled()) {          log.error("Exception killing process for " + name + ": ", e);        }      }    }  }