}   try {   client.removeListener(this); log.debug("Listener removed from server");  callbackServer.stop(); log.debug("Closed callback server " + callbackServer.getInvokerLocator()); } catch(Throwable e) { log.warn("Failed to clean up callback handler/callback server", e); }
}
   public synchronized void close()   {      closed = true;                stopReceiver();                   //There may still be pending calls to activateConsumer - we wait for them to complete (or fail)      while (activationCount.get() != 0)      {         Thread.yield();      }            // TODO Get rid of this (http://jira.jboss.org/jira/browse/JBMESSAGING-92)      try      {         // unregister this callback handler and stop the callback server         client.removeListener(this);         log.debug("Listener removed from server");         callbackServer.stop();         log.debug("Closed callback server " + callbackServer.getInvokerLocator());      }      catch(Throwable e)      {         log.warn("Failed to clean up callback handler/callback server", e);      }   }