code: public HttpSession newHttpSession(HttpServletRequest request)
      {
          Session session = newSession(request);
          session.setMaxInactiveInterval(_dftMaxIdleSecs);
          synchronized(__allSessions)
          {
              synchronized(this)
              {
                _sessions.put(session.getId(),session);
                __allSessions.add(session.getId(), session);
                if (_sessions.size() > this._maxSessions)
                    this._maxSessions = _sessions.size ();
              }
          }
          
          HttpSessionEvent event=new HttpSessionEvent(session);
          
          for(int i=0;i<_sessionListeners.size();i++)
              ((HttpSessionListener)_sessionListeners.get(i))
              .sessionCreated(event);
          
          if (getCrossContextSessionIDs())
              request.setAttribute(__NEW_SESSION_ID, session.getId());
          return session;
      }
docs: /* ------------------------------------------------------------