JMSRemotingConnection remotingConnection = state.getRemotingConnection();   ConsolidatedRemotingConnectionListener listener = state.getRemotingConnectionListener(); listener.clear();  Client client = remotingConnection.getInvokingClient(); boolean removed = client.removeConnectionListener(listener);  log.debug(this + (removed ? " removed " : " failed to remove ") + "the consolidated remoting connection listener from " + client);
   public Object handleClose(Invocation invocation) throws Throwable   {      Object ret = invocation.invokeNext();            // Remove any exception listener      ConnectionState currentState = getConnectionState(invocation);            Client client = getConnectionState(invocation).getRemotingConnection().getInvokingClient();            if (currentState.isListenerAdded())      {         client.removeConnectionListener(this);      }                  ConnectionState state = getConnectionState(invocation);            // Finished with the connection - we need to shutdown callback server      state.getRemotingConnection().stop();             // Remove reference to message id generator      MessageIdGeneratorFactory.instance.checkInGenerator(state.getServerID());            return ret;   }