@Override public void channelRemoved(MessageChannel channel) { ChannelID clientID = channel.getChannelID(); try { clientStateStore.deleteClientState(clientID); } catch (ClientNotFoundException e) { throw new AssertionError(e); } fireDestroyedEvent(new ConnectionID(ConnectionID.NULL_JVM_ID, clientID.toLong(), uid)); }
/** * Once the local JMX server has successfully started (this happens in a background thread as DSO * is so early in the startup process that the system JMX server in 1.5+ can't be created inline * with other initialization) we send a 'ready' message to the L2 each time we connect to it. This * tells the L2 that they can connect to our local JMX server and see the beans we have in the DSO * client. */ private void sendJmxReadyMessageIfNecessary() { final boolean send; synchronized (jmxReadyLock) { send = isTunnelingReady() && !sentReadyMessage; if (send) { sentReadyMessage = true; } } // Doing this message send outside of the jmxReadyLock to avoid a // deadlock (CDV-132) if (send) { logger.info("Client JMX server ready; sending notification to L2 server"); L1JmxReady readyMessage = (L1JmxReady) channel.createMessage(TCMessageType.CLIENT_JMX_READY_MESSAGE); readyMessage.initialize(uuid, config.getTunneledDomains()); readyMessage.send(); } }