/** * Create a new HttpSession for a request */ public HttpSession newHttpSession(HttpServletRequest request) { Session session=newSession(request); session.setMaxInactiveInterval(_dftMaxIdleSecs); addSession(session,true); return session; }
/** * Add the session Registers the session with this manager and registers the * session ID with the sessionIDManager; */ protected void addSession(Session session, boolean created) { synchronized (_sessionIdManager) { _sessionIdManager.addSession(session); synchronized (this) { addSession(session); if (getSessions()>this._maxSessions) this._maxSessions=getSessions(); } } if (!created) { session.didActivate(); } else if (_sessionListeners!=null) { HttpSessionEvent event=new HttpSessionEvent(session); for (int i=0; i<LazyList.size(_sessionListeners); i++) ((HttpSessionListener)LazyList.get(_sessionListeners,i)).sessionCreated(event); } }