Callback for {@link HttpSessionBindingListener} -- should not be invoked directly.
969243
public void valueUnbound( HttpSessionBindingEvent event )
    {
        if ( _log.isDebugEnabled() )
        {
            _log.debug( "The page flow stack is being unbound from the session." );
        }
        
        while ( ! isEmpty() )
        {
            PageFlowController jpf = pop( null ).getPageFlow();
            
            // Note that this page flow may have been serialized/deserialized, which will cause its transient info
            // to be lost.  Rehydrate it.
            HttpSession session = event.getSession();
            if ( session != null ) jpf.reinitialize( null, null, session.getServletContext() );
            
            if ( ! jpf.isLongLived() ) jpf.destroy( event.getSession() );
        }
    }
87365
public synchronized void addJingleSessionRequestListener(final JingleSessionRequestListener jingleSessionRequestListener) {
        if (jingleSessionRequestListener != null) {
            if (jingleSessionRequestListeners == null) {
                initJingleSessionRequestListeners();
            }
            synchronized (jingleSessionRequestListeners) {
                jingleSessionRequestListeners.add(jingleSessionRequestListener);
            }
        }
    }
699877
@Override
    public void sessionCreated(HttpSessionEvent event) {

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "HttpSession created: HttpSession ID: " + event.getSession().getId());
        }
        // nothing to do here, since later the code will add the session id to a map 

    }
580951
private void invalidateSession(HttpServletRequest req) {
        HttpSession session = req.getSession(false);
        if (session != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "invalidating existing HTTP Session");
            session.invalidate();
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Existing HTTP Session does not exist, nothing to invalidate");
        }
    }
1190468
public ParticipantListener createSessionListener(String sessionId, ISessionUpdate callback) {
        return SessionService.create(self, sessionId, eventManager, callback);
    }
338409
public void sessionCreated(ISession session) {
        HttpSession httpsession = (HttpSessionImpl) _adapter.adapt(session);
        HttpSessionEvent event = new HttpSessionEvent(httpsession);
        HttpSessionListener listener = null;

        // synchronized (_sessionListeners) {
        for (int i = 0; i < _sessionListeners.size(); i++) {
            listener = (HttpSessionListener) _sessionListeners.get(i);
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionCreated", "Calling sessionCreated on listener:" + listener);
            }
            if (!session.isOverflow()) { //PK85530
                listener.sessionCreated(event);
            }
        }
        // }

    }
728403
public void addHttpSessionListener(HttpSessionListener listener, String J2EEName) {
        synchronized (mHttpSessionListeners) {
            mHttpSessionListeners.add(listener);
            mHttpSessionListenersJ2eeNames.add(J2EEName);
            sessionListener = true;
            _coreHttpSessionManager.getIStore().setHttpSessionListener(true);
            // PM03375: Set app listeners
            if (mHttpAppSessionListeners != null)
                mHttpAppSessionListeners.add(listener);
            // PM03375: Set listener for app session manager 
            if (_coreHttpAppSessionManager != null)
                _coreHttpAppSessionManager.getIStore().setHttpSessionListener(true);

            if (listener instanceof IBMSessionListener) {
                wasHttpSessionObserver.setDoesContainIBMSessionListener(true);
                // PM03375: Mark app observer
                // Begin: PM03375: Use separate observer for app sessions
                if (wasHttpAppSessionObserver != null) {
                    wasHttpAppSessionObserver.setDoesContainIBMSessionListener(true);
                    LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[ADD_HTTP_SESSION_LISTENER], "Marked " +
                                                                                                                              " app IBM session listener for app observer "
                                                                                                                              + mHttpAppSessionListeners);
                }
                // End: PM03375
            }
        }

    }
38160
public MobicentsSipApplicationSession findSipApplicationSession(HttpSession httpSession) {
		for (MobicentsSipApplicationSession sipApplicationSessionImpl : sipApplicationSessions.values()) {			
			if(sipApplicationSessionImpl.findHttpSession(httpSession.getId()) != null) {
				return sipApplicationSessionImpl;
			}
		}
		return null;
	}
266413
@Override
    public boolean contextListenerStart() {
		boolean ok = super.contextListenerStart();
		//the web listeners couldn't be started so we don't even try to load the sip ones
		if(!ok) {
			return ok;
		}

		if (logger.isDebugEnabled())
            logger.debug("Configuring sip listeners");

        // Instantiate the required listeners
        ClassLoader loader = getLoader().getClassLoader();
        ok = sipListeners.loadListeners(findSipApplicationListeners(), loader);
        if(!ok) {
			return ok;
		}

        List<ServletContextListener> servletContextListeners = sipListeners.getServletContextListeners();
        if (servletContextListeners != null) {
            ServletContextEvent event =
                new ServletContextEvent(getServletContext());
            for (ServletContextListener servletContextListener : servletContextListeners) {
                if (servletContextListener == null)
                    continue;

                try {
                    fireContainerEvent("beforeContextInitialized", servletContextListener);
                    servletContextListener.contextInitialized(event);
                    fireContainerEvent("afterContextInitialized", servletContextListener);
                } catch (Throwable t) {
                    fireContainerEvent("afterContextInitialized", servletContextListener);
//                    getLogger().error
//                        (sm.getString("standardContext.listenerStart",
//                        		servletContextListener.getClass().getName()), t);
                    getLogger().error
                    	(MESSAGES.errorSendingContextInitializedEvent(servletContextListener.getClass().getName()), t);
                    ok = false;
                }

                // TODO Annotation processing
            }
        }

        return (ok);

    }
626863
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;
    }
1182663
public void valueUnbound(HttpSessionBindingEvent event) {
        for (SessionFieldMapper fieldMapper : this.values()) {
            if (fieldMapper.runnable != null) fieldMapper.runnable.cancel();
        }
    }
994176
public void sessionCreated(HttpSessionEvent httpSessionEvent) {
		if (active) {
			if (log.isDebugEnabled()) 
				log.debug("sessionCreated sessionId = "
						+ httpSessionEvent.getSession().getId());
		}
	}
982196
@Override
    public void attributeReplaced(HttpSessionBindingEvent hse) {
        Object possibleClient = hse.getValue();
        closeClient(possibleClient);
    }
154791
@Override
    public void sessionDestroyed(HttpSessionEvent event) {

        String id = event.getSession().getId();
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "HttpSession destroyed: HttpSession ID: " + event.getSession().getId());
        }

        // close the websocket session from here if the websocket session was secure.
        if (endpointManager != null) {
            endpointManager.httpSessionExpired(id);
        }
    }
356956
public void removeHttpSession(HttpSession session) {
		if (session == activeSession) {
			activeSession = null;
		}
		synchronized (this.sessions) {
			this.sessions.remove(session);
		}
		this.model.removeHttpSession(session);
		session.invalidate();
	}
322168
@Override
	public void sessionClosed(IoSession session) throws Exception {
		log.debug("Session closed for sensor {}.", session);
		if (this.sensorIoAdapter != null) {
			this.sensorIoAdapter.sensorDisconnected(session);
		}
	}
275074
public void setSessionManager(SessionManager sm)
    {
        if (isStarted())
            throw new IllegalStateException("Started");

        SessionManager old= getSessionManager();

        if (getHttpContext() != null)
        {
            // recover config and remove listeners from old session manager
            if (old != null && old != sm)
            {
                if (_sessionListeners != null)
                {
                    for (Iterator i= LazyList.iterator(_sessionListeners); i.hasNext();)
                    {
                        EventListener listener= (EventListener)i.next();
                        _sessionManager.removeEventListener(listener);
                    }
                }
            }

            // Set listeners and config on new listener.
            if (sm != null && old != sm)
            {
                if (_sessionListeners != null)
                {
                    for (Iterator i= LazyList.iterator(_sessionListeners); i.hasNext();)
                    {
                        EventListener listener= (EventListener)i.next();
                        sm.addEventListener(listener);
                    }
                }
            }
        }

        super.setSessionManager(sm);
    }