if (log.isDebugEnabled()) log.debug("AggPlugin:("+me+"):canceled session at "+ar.getTargets().iterator().next());
if (log != null && log.isDebugEnabled()) log.debug("AggPlugin:("+me+"):canceled session at "+ar.getTargets().iterator().next());
  private void cancelRemoteSession(String queryId) {      // todo: this is horribly inefficient.      try {          Iterator iter = messageSub.getCollection().iterator();          while(iter.hasNext()) {              AggRelay ar = (AggRelay) iter.next();              XMLMessage xmsg = (XMLMessage)ar.getContent();              Element root = XmlUtils.parse(xmsg.getText());              String this_id = root.getAttribute("query_id");              if (queryId.equals(this_id)) {                  getBlackboardService().publishRemove(ar);                  if (log.isDebugEnabled()) log.debug("AggPlugin:("+me+"):canceled session at "+ar.getTargets().iterator().next());              }          }      } catch (Exception ioe) {          if (log.isErrorEnabled()) log.error("AggPlugin:("+me+"):error canceling session"+ioe);      }  }