code: public synchronized void removeSession(Endpoint ep, SessionExt sess) {
          Class<?> cl = ep.getClass();
  
          if (cl.equals(AnnotatedEndpoint.class)) {
              AnnotatedEndpoint ae = (AnnotatedEndpoint) ep;
              cl = ae.getServerEndpointClass();
          }
  
          // Always try to remove http session if we can.
          String id = sess.getSessionImpl().getHttpSessionID();
          if (id != null) {
              httpSessionMap.remove(id);
          }
  
          // find the session array for the given endpoint
          ArrayList<Session> sa = endpointSessionMap.get(cl);
  
          // nothing to remove if we don't have a session
          if (sa == null) {
              return;
          }
  
          // remove the new session from the list for this endpoint
          sa.remove(sess);
  
          // put the updated list back into the Map
          endpointSessionMap.put(cl, sa);
  
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "removed session of: " + sess.getId() + "  from endpoint class of: " + cl.getName() + " in endpointmanager of: " + this.hashCode());
          }
      }
docs: /*
  closeAllSessions will call this with the session already removed...