return; }  log.warn(this + " handling client " + remotingSessionID + "'s remoting connection failure " + "(" + (t == null ? "null Throwable" : t.getClass().toString()) + ")", t);  try { ce.close(); log.debug("cleared up state for connection " + ce); } catch (JMSException e) { log.error("Failed to close connection", e); }
log.warn(this + " handling client " + remotingSessionID + "'s remoting connection failure " + "(" + (t == null ? "null Throwable" : t.getClass().toString()) + ")", t);    Map endpoints = (Map)jmsClients.get(jmsClientId);  if (endpoints != null) { Iterator iter = endpoints.entrySet().iterator();  while (iter.hasNext()) { Map.Entry entry = (Map.Entry)iter.next();  String sessionId = (String)entry.getKey();  ServerConnectionEndpoint sce = (ServerConnectionEndpoint)entry.getValue();  try { sce.close(); log.debug("cleared up state for connection " + sce); } catch (JMSException e) { log.error("Failed to close connection", e); }  sessions.remove(sessionId); }  jmsClients.remove(jmsClientId); } }
   public void handleConnectionException(Throwable t, Client client)   {        String remotingSessionID = client.getSessionId();      if (t instanceof ClientDisconnectedException)      {         // This is OK         if (log.isTraceEnabled()) { log.trace(this + " notified that client " + client + " has disconnected"); }         return;      }            ServerConnectionEndpoint ce = (ServerConnectionEndpoint)connections.remove(remotingSessionID);      if (ce == null)      {         //Not all remoting sessions correspond to jms connections so this is ok to ignore                  return;      }            log.warn(this + " handling client " + remotingSessionID + "'s remoting connection failure " +            "(" + (t == null ? "null Throwable" : t.getClass().toString()) + ")", t);      try      {         ce.close();         log.debug("cleared up state for connection " + ce);      }      catch (JMSException e)      {         log.error("Failed to close connection", e);      }   }