setClosed(true);  log.debug("closing " + this);  if (receivingThread != null) { receivingThread.interrupt(); if (log.isTraceEnabled()) { log.trace("interrupted receiving thread " + receivingThread); } }  messages = null;   try {   if (log.isTraceEnabled()) { log.trace("attempting to remove listener from callback server"); } client.removeListener(this); if (log.isTraceEnabled()) { log.trace("removed listener from callback server"); }  if (log.isTraceEnabled()) { log.trace("attempting to stop callback server"); } callbackServer.stop(); if (log.isTraceEnabled()) { log.trace("closed callback server " + callbackServer.getInvokerLocator()); } } catch(Throwable e) { log.warn("Failed to clean up callback handler/callback server", e); }
   public void close()   {      if (isClosed())      {         if (log.isTraceEnabled()) { log.trace(this + " already closed, returning"); }         return;      }      setClosed(true);      log.debug("closing " + this);      if (receivingThread != null)      {         receivingThread.interrupt();         if (log.isTraceEnabled()) { log.trace("interrupted receiving thread " + receivingThread); }      }      messages = null;      // TODO Get rid of this (http://jira.jboss.org/jira/browse/JBMESSAGING-92)      try      {         // unregister this callback handler and stop the callback server         if (log.isTraceEnabled()) { log.trace("attempting to remove listener from callback server"); }         client.removeListener(this);         if (log.isTraceEnabled()) { log.trace("removed listener from callback server"); }         if (log.isTraceEnabled()) { log.trace("attempting to stop callback server"); }         callbackServer.stop();         if (log.isTraceEnabled()) { log.trace("closed callback server " + callbackServer.getInvokerLocator()); }      }      catch(Throwable e)      {         log.warn("Failed to clean up callback handler/callback server", e);      }   }