while (activationCount.get() != 0) { Thread.yield(); }
   public synchronized void close()   {      closed = true;                stopReceiver();                   // 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);      }   }