Java Code Examples for org.eclipse.jetty.server.session.DefaultSessionIdManager

Following code examples demonstrate how to use org.eclipse.jetty.server.session.DefaultSessionIdManager from jetty. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.eclipse.jetty.server.session.DefaultSessionIdManager and various code implementation of this class.

  public SessionHandler createSessionHandler( Server server ) {
    SessionHandler handler = new SessionHandler();
    DefaultSessionCache sessionCache = new DefaultSessionCache( handler );
    JDBCSessionDataStore sessionDataStore = new JDBCSessionDataStore();
    sessionCache.setSessionDataStore( sessionDataStore );
    DatabaseAdaptor databaseAdaptor = new DatabaseAdaptor();
    databaseAdaptor.setDriverInfo( databaseServer.getDriver(), databaseServer.getConnectionUrl() );
    sessionDataStore.setDatabaseAdaptor( databaseAdaptor );
    DefaultSessionIdManager sessionIdManager = new CleanJDBCSessionIdManager( server );
    sessionIdManager.setWorkerName( generateNodeName() );
    handler.setSessionCache( sessionCache );
    handler.setSessionIdManager( sessionIdManager );
    return handler;
  } 


    public static void main(String[] args) throws Exception {
        LogManager.getLogManager().readConfiguration(Main.class.getResourceAsStream("/logger.properties"));

        Templates.getInstance();
        DB.getInstance();

        Server server = new Server(8080);
        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setResourceBase("data");

        ContextHandler resourceContext = new ContextHandler();
        resourceContext.setContextPath("/data");
        resourceContext.setHandler(resourceHandler);

        IBoardHandler iBoardHandler = new IBoardHandler();

        SessionHandler sessionHandler = new SessionHandler();
        sessionHandler.setSessionIdManager(new DefaultSessionIdManager(server));

        HandlerList handlers = new HandlerList(resourceContext, sessionHandler, iBoardHandler);

        server.setHandler(handlers);

        server.start();
        log.info("Application started");
    } 

  public SessionHandler createSessionHandler( Server server ) throws Exception {
    SessionHandler handler = new SessionHandler();
    DefaultSessionCache sessionCache = new DefaultSessionCache( handler );
    NullSessionDataStore sessionDataStore = new NullSessionDataStore();
    sessionCache.setSessionDataStore( sessionDataStore );
    DefaultSessionIdManager sessionIdManager = new DefaultSessionIdManager( server );
    HouseKeeper houseKeeper = new HouseKeeper();
    houseKeeper.setIntervalSec( SCAVENGE_INTERVAL );
    sessionIdManager.setSessionHouseKeeper( houseKeeper );
    handler.setSessionCache( sessionCache );
    handler.setSessionIdManager( sessionIdManager );
    return handler;
  } 

    public void start() throws Exception {
        Server server = new Server(port);

        SessionIdManager idManager = new DefaultSessionIdManager(server);
        server.setSessionIdManager(idManager);

        SessionHandler sessionHandler = new SessionHandler();

        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setWelcomeFiles(new String[]{"html/index.html"});
        resourceHandler.setResourceBase("target/classes");

        ContextHandler appHandler = new ContextHandler();
        appHandler.setContextPath("/legup");
        HandlerList appHandlers = new HandlerList();
        AppHandler legUpHandler = new AppHandler(connectionPool, nameParser);
        appHandlers.setHandlers(new Handler[]{ sessionHandler, legUpHandler, resourceHandler });
        appHandler.setHandler(appHandlers);

        HandlerList handlers = new HandlerList();
        handlers.setHandlers(new Handler[]{appHandler, resourceHandler });

        server.setHandler(handlers);

        server.start();
    } 

    }

    private void startJetty()
        throws Exception
    {
        this.server = new Server();

        this.contexts = new ContextHandlerCollection();

        this.dispatcherServlets.stream().
            map( this::initServletContextHandler ).
            forEach( contexts::addHandler );

        new HttpConfigurator().configure( this.config, this.server );

        Metrics.removeAll( Handler.class );
        final InstrumentedHandler instrumentedHandler = new InstrumentedHandler( Metrics.registry(), Handler.class.getName() );
        instrumentedHandler.setHandler( contexts );

        this.server.setHandler( contexts );

        final DefaultSessionIdManager sessionManager = new DefaultSessionIdManager( this.server );
        sessionManager.setWorkerName( this.workerName );
        this.server.setSessionIdManager( sessionManager );

        this.server.start();
        LOG.info( "Started Jetty" );
        LOG.info( "Listening on ports [{}](xp), [{}](management) and [{}](monitoring)", config.http_xp_port(),
                  config.http_management_port(), config.http_monitor_port() );
    } 

    private static SessionHandler createSessionHandler(HikariDataSource d) {
        final DefaultSessionIdManager idmgr = new DefaultSessionIdManager(server);
        idmgr.setServer(server);
        try {
            idmgr.setWorkerName(InetAddress.getLocalHost().getHostAddress().replace(".", "_"));
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
        }
        server.setSessionIdManager(idmgr);
        JDBCSessionDataStore sessionStore = new JDBCSessionDataStore();
        DatabaseAdaptor databaseAdaptor = new DatabaseAdaptor();
        databaseAdaptor.setDatasource(d);
        sessionStore.setDatabaseAdaptor(databaseAdaptor);
        SessionHandler sessionHandler = new SessionHandler();
        DefaultSessionCache cacheSession = new DefaultSessionCache(sessionHandler);
        sessionHandler.setSessionCache(cacheSession);
        cacheSession.setSessionDataStore(sessionStore);
        sessionHandler.setSessionIdManager(idmgr);

        return sessionHandler;
    } 

	public static void main(String[] args) throws Exception {
		ConfigurationManager manager = new ConfigurationManager();
		SQLManager.getInstance().setConfig(manager.getConfig()); 
		
		Server server = new Server(manager.getConfig().getServerPort());
        
		ServletHandler handler = new ServletHandler();
        server.setHandler(handler);
        SessionIdManager idmanager = new DefaultSessionIdManager(server);
        server.setSessionIdManager(idmanager);
        SessionHandler sessionsHandler = new SessionHandler();       
        handler.setHandler(sessionsHandler);
        
        handler.addServletWithMapping(HomePageServlet.class, "/");
        handler.addServletWithMapping(SignUpServlet.class, "/signup");
        handler.addServletWithMapping(LoginServlet.class, "/login");
        handler.addServletWithMapping(LogoutServlet.class, "/logout");
        handler.addServletWithMapping(EventListServlet.class, "/eventlist");
        handler.addServletWithMapping(EventDetailServlet.class, "/event");
        handler.addServletWithMapping(CreateEventServlet.class, "/eventcreate");
        handler.addServletWithMapping(UserInfoServlet.class, "/userinfo");
        handler.addServletWithMapping(PurchaseTicketServlet.class, "/purchaseticket");
        handler.addServletWithMapping(TransferTicketServlet.class, "/transferticket");
        handler.addServletWithMapping(ModifyEventServlet.class, "/modifyevent");
        handler.addServletWithMapping(RemoveEventServlet.class, "/removeevent");
        server.start();
        server.join();

	} 

    public void start(XApp app) {
        XProperties props = app.prop();

        int s_timeout = props.getInt("server.session.timeout", 0);
        SessionHandler s_handler = new SessionHandler();

        if (s_timeout > 0) {
            s_handler.setMaxInactiveInterval(s_timeout);
        }

        JtHttpContextHandler _handler = new JtHttpContextHandler(true, app);
        s_handler.setHandler(_handler);

        _server = new Server(app.port());
        _server.setSessionIdManager(new DefaultSessionIdManager(_server));
        _server.setHandler(s_handler);


        if (props != null) {
            props.forEach((k, v) -> {
                String key = k.toString();
                if (key.indexOf(".jetty.") > 0) {
                    _server.setAttribute(key, v);
                }
            });
        }

        try {
            _server.start();
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        app.onStop(this::stop);
    } 

  @Override
  public void setUp() throws Exception
  {
    super.setUp();
    System.setProperty("solr.solr.home", SolrJettyTestBase.legacyExampleCollection1SolrHome());
    System.setProperty("tests.shardhandler.randomSeed", Long.toString(random().nextLong()));
    System.setProperty("solr.tests.doContainerStreamCloseAssert", "false");
    
    File dataDir = createTempDir().toFile();
    dataDir.mkdirs();

    System.setProperty("solr.data.dir", dataDir.getCanonicalPath());
    String path = ExternalPaths.WEBAPP_HOME;

    server = new Server(port);
    server.setSessionIdManager(new DefaultSessionIdManager(server, new Random(random().nextLong())));
    new WebAppContext(server, path, context );

    ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory());
    connector.setIdleTimeout(1000 * 60 * 60);
    connector.setSoLingerTime(-1);
    connector.setPort(0);
    server.setConnectors(new Connector[]{connector});
    server.setStopAtShutdown( true );
    
    server.start();
    port = connector.getLocalPort();
  } 

	public static SessionHandler createSessionHandler(Server server) {
		DefaultSessionIdManager	 idmanager = new DefaultSessionIdManager(server);
	    server.setSessionIdManager(idmanager);
	
	    SessionHandler sessionHandler = new SessionHandler();
	    sessionHandler.setMaxInactiveInterval(3600);
	    sessionHandler.setHttpOnly(false);
	    sessionHandler.setUsingCookies(true);
	    
        SessionCache cache = new DefaultSessionCache(sessionHandler);
        cache.setSessionDataStore(new NullSessionDataStore());
        sessionHandler.setSessionCache(cache);
	    
	    return sessionHandler;
	} 

    public EmbeddedServletContainerCustomizer embeddedServletContainerCustomizer(Environment environment) {
        return (container) -> {
            container.addInitializers(SERVLET_CONTEXT_INITIALIZER);
            Map<String, String> mimeMappings = new HashMap<>();
            mimeMappings.put("eot", "application/vnd.ms-fontobject");
            mimeMappings.put("otf", "font/opentype");
            mimeMappings.put("ttf", "application/x-font-ttf");
            mimeMappings.put("woff", "application/x-font-woff");
            mimeMappings.put("svg", "image/svg+xml");
            container.setSessionTimeout(2, TimeUnit.HOURS);
            container.setMimeMappings(new MimeMappings(mimeMappings));
            if(!environment.acceptsProfiles("dev")) {
                container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404-not-found"), new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/500-internal-server-error"), new ErrorPage("/session-expired"));
            }

            Optional.ofNullable(System.getProperty("alfio.worker.name")).ifPresent(workerName -> {
                ((JettyEmbeddedServletContainerFactory)container).addServerCustomizers(server -> {
                    log.info("Configuring session manager using worker name {}", workerName);
                    DefaultSessionIdManager sessionIdManager = new DefaultSessionIdManager(server);
                    sessionIdManager.setWorkerName(workerName);
                    server.setSessionIdManager(sessionIdManager);
                });
            });


        };
    } 

  public static synchronized Server newHttpServer(Handler handler) throws Exception {
    final boolean useSsl = Boolean.getBoolean("tests.jettySsl");
    final SslContextFactory sslcontext = new SslContextFactory(false);
    
    if (useSsl) {
      if (null != System.getProperty("javax.net.ssl.keyStore")) {
        sslcontext.setKeyStorePath
        (System.getProperty("javax.net.ssl.keyStore"));
      }
      if (null != System.getProperty("javax.net.ssl.keyStorePassword")) {
        sslcontext.setKeyStorePassword
        (System.getProperty("javax.net.ssl.keyStorePassword"));
      }
      if (null != System.getProperty("javax.net.ssl.trustStore")) {
        sslcontext.setKeyStorePath
        (System.getProperty("javax.net.ssl.trustStore"));
      }
      if (null != System.getProperty("javax.net.ssl.trustStorePassword")) {
        sslcontext.setTrustStorePassword
        (System.getProperty("javax.net.ssl.trustStorePassword"));
      }
      sslcontext.setNeedClientAuth(Boolean.getBoolean("tests.jettySsl.clientAuth"));
    }
    
    final QueuedThreadPool threadPool = new QueuedThreadPool();
    threadPool.setDaemon(true);
    threadPool.setMaxThreads(10000);
    threadPool.setIdleTimeout(5000);
    threadPool.setStopTimeout(30000);

    Server server = new Server(threadPool);
    server.setStopAtShutdown(true);
    server.manage(threadPool);


    final ServerConnector connector;
    if (useSsl) {
      HttpConfiguration configuration = new HttpConfiguration();
      configuration.setSecureScheme("https");
      configuration.addCustomizer(new SecureRequestCustomizer());
      ServerConnector c = new ServerConnector(server, new SslConnectionFactory(sslcontext, "http/1.1"),
          new HttpConnectionFactory(configuration));
      connector = c;
    } else {
      ServerConnector c = new ServerConnector(server, new HttpConnectionFactory());
      connector = c;
    }
    
    connector.setPort(0);
    connector.setHost("127.0.0.1");

    server.setConnectors(new Connector[] {connector});
    server.setSessionIdManager(new DefaultSessionIdManager(server, new Random(random().nextLong())));
    server.setHandler(handler);
    
    server.start();
    
    return server;
  } 

    public void start(XApp app) {

        XProperties props = app.prop();

        int s_timeout = props.getInt("server.session.timeout", 0);

        try {

            ServletContextHandler servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
            servletContextHandler.setContextPath("/");
            servletContextHandler.setBaseResource(new ResourceCollection(getResourceURLs()));
            servletContextHandler.addServlet(JspHttpContextServlet.class, "/");

            if(s_timeout>0) {
                servletContextHandler.getSessionHandler().setMaxInactiveInterval(s_timeout);
            }

            enableJspSupport(servletContextHandler);

            _server = new Server(app.port());
            _server.setSessionIdManager(new DefaultSessionIdManager(_server));
            _server.setHandler(servletContextHandler);

            if (props != null) {
                props.forEach((k, v) -> {
                    String key = k.toString();
                    if (key.indexOf(".jetty.") > 0) {
                        _server.setAttribute(key, v);
                    }
                });
            }

            _server.start();

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    } 

    ServletContextHandler build(Server server) {
        Constraint constraint = new Constraint();
        constraint.setName(Constraint.__FORM_AUTH);
        constraint.setRoles(new String[]{"user"});
        constraint.setAuthenticate(true);

        ConstraintMapping mapping = new ConstraintMapping();
        mapping.setConstraint(constraint);
        mapping.setPathSpec(this.securedPath);

        ConstraintSecurityHandler security = new ConstraintSecurityHandler();
        CustomFormAuthenticator authenticator = new CustomFormAuthenticator(this.loginPage, this.errorPage, false,
            this.loginProvider);
        authenticator.setAlwaysSaveUri(true);
        security.setAuthenticator(authenticator);
        security.addConstraintMapping(mapping);
        security.setLoginService(new CustomLoginService(this.loginProvider));

        DefaultSessionIdManager manager = new DefaultSessionIdManager(server.getInnerServer());
        SessionHandler session = new SessionHandler();
        session.setSessionIdManager(manager);

        if (sessionDataStore != null) {
            DefaultSessionCache cache = new DefaultSessionCache(session);
            cache.setSessionDataStore(sessionDataStore);
            cache.setRemoveUnloadableSessions(true);
            cache.setSaveOnCreate(false);
            session.setSessionCache(cache);
            session.setMaxInactiveInterval((int) sessionTimeout);
        }

        ServletContextHandler root = new ServletContextHandler(null, "/", true, true);
        root.setSecurityHandler(security);
        root.setSessionHandler(session);
        return root;
    } 

    public static SessionHandler createCookieTrackingSessionHandler(Server server) {
        SessionHandler handler = new SessionHandler();
        SessionIdManager sessionManager = new DefaultSessionIdManager(server);
        handler.setSessionIdManager(sessionManager);
        return handler;
    } 

	public void setup() {
		if (server != null)
			return;		
		Log.d(LOGTAG, "setup");
		if ( ! jettyLog) {
			Log.d(LOGTAG, "Disable Jetty logging");
			org.eclipse.jetty.util.log.Log.setLog(new DummyLogger());
		}
		server = new Server();

		ServerConnector connector = new ServerConnector(server);
		connector.setPort(port);
		server.setConnectors(new Connector[] { connector });
		
		if (oneThread) {
			Log.e(LOGTAG, "TODO oneThread support");
		}
		root = new ServletHandler();		

        SessionIdManager idmanager = new DefaultSessionIdManager(server);
        server.setSessionIdManager(idmanager);
        

        SessionHandler sessions = new SessionHandler();
        Set<SessionTrackingMode> sessionTrackingModes = new ArraySet(SessionTrackingMode.COOKIE);
		sessions.setSessionTrackingModes(sessionTrackingModes);
        
        server.setHandler(sessions);      
        sessions.setHandler(root);
        

		if (webXmlFile != null) {
			if ( ! webXmlFile.exists()) {
				throw new IllegalArgumentException(webXmlFile.getAbsolutePath()+ " does not exist.");
			}
			run2_webXml();
		}
	} 

    public void start() throws Exception {
        QueuedThreadPool threadPool = new QueuedThreadPool();
        threadPool.setMaxThreads(threadsNum);
        server = new Server(threadPool);
        server.addBean(new ScheduledExecutorScheduler());
        server.addConnector(createHttpConnector(httpPort));
        if (httpsPort != null) {
            server.addConnector(createHttpsConnector(httpsPort));
        }
        if (sessionDataStoreFactory != null) {
            server.addBean(sessionDataStoreFactory);
        }

        if (workerName != null) {
            DefaultSessionIdManager sessionIdManager = new DefaultSessionIdManager(server, new SecureRandom());
            sessionIdManager.setWorkerName(workerName.replace(".", "_"));
            server.setSessionIdManager(sessionIdManager);
        }

        String webrootPathname = webRoot.getAbsolutePath();

        URL webDescriptorURL = getClass().getClassLoader().getResource(webDescriptor);
        if (webDescriptorURL == null) {
            throw new RuntimeException(String.format("Cannot find WEB descriptor file %s in classpath",
                    webDescriptor));
        }

        WebAppContext webAppContext = new WebAppContext(webrootPathname, "/");
        webAppContext.setContextPath("/");
        webAppContext.setDescriptor(webDescriptorURL.toString());
        webAppContext.setResourceBase(webrootPathname);
        webAppContext.setDisplayName(displayName);
        webAppContext.setClassLoader(Thread.currentThread().getContextClassLoader());
        webAppContext.setConfigurationDiscovered(true);
        webAppContext.setParentLoaderPriority(true);

        if (properties.getBoolean("http.server.gzip.enabled", true)) {
            GzipHandler gzipHandler = getGzipHandler();
            gzipHandler.setHandler(webAppContext);
            server.setHandler(gzipHandler);
        }

        server.start();
    } 

    }

    private void startSPNEGO(Scenario scenario, Handler handler) throws Exception
    {
        server = new Server();
        server.setSessionIdManager(new DefaultSessionIdManager(server));
        HashLoginService authorizationService = new HashLoginService(realm, realmPropsPath.toString());
        ConfigurableSpnegoLoginService loginService = new ConfigurableSpnegoLoginService(realm, AuthorizationService.from(authorizationService, ""));
        loginService.addBean(authorizationService);
        loginService.setKeyTabPath(serviceKeyTabPath);
        loginService.setServiceName(serviceName);
        loginService.setHostName(serviceHost);
        server.addBean(loginService);

        ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
        Constraint constraint = new Constraint();
        constraint.setAuthenticate(true);
        ConstraintMapping mapping = new ConstraintMapping();
        mapping.setPathSpec("/secure");
        mapping.setConstraint(constraint);
        securityHandler.addConstraintMapping(mapping);
        authenticator = new ConfigurableSpnegoAuthenticator();
        securityHandler.setAuthenticator(authenticator);
        securityHandler.setLoginService(loginService);
        securityHandler.setHandler(handler);

        SessionHandler sessionHandler = new SessionHandler();
        sessionHandler.setHandler(securityHandler);
        start(scenario, sessionHandler);
    } 

    private void initSessionManager() {
        idmanager = new DefaultSessionIdManager(server);
        server.setSessionIdManager(idmanager);

        SessionHandler sessions = new SessionHandler();
        sessions.setSessionIdManager(idmanager);
        filters.addHandler(sessions);
    } 

    @Test
    public void testEncodeRedirect()
            throws Exception
    {
        Response response = getResponse();
        Request request = response.getHttpChannel().getRequest();
        request.setAuthority("myhost",8888);
        request.setContextPath("/path");


        request.setRequestedSessionId("12345");
        request.setRequestedSessionIdFromCookie(false);
        SessionHandler handler = new SessionHandler();
        DefaultSessionCache ss = new DefaultSessionCache(handler);
        NullSessionDataStore ds = new NullSessionDataStore();
        ss.setSessionDataStore(ds);
        DefaultSessionIdManager idMgr = new DefaultSessionIdManager(_server);
        idMgr.setWorkerName(null);
        handler.setSessionIdManager(idMgr);
        request.setSessionHandler(handler);
        TestSession tsession = new TestSession(handler, "12345");
        tsession.setExtendedId(handler.getSessionIdManager().getExtendedId("12345", null));
        request.setSession(tsession);

        handler.setCheckingRemoteSessionIdEncoding(false);


        handler.setCheckingRemoteSessionIdEncoding(true);

        request.setContextPath("");
        assertEquals("mailto:/foo", response.encodeURL("mailto:/foo"));
        handler.setCheckingRemoteSessionIdEncoding(false);
        assertEquals("/foo;jsessionid=12345", response.encodeURL("/foo"));
        assertEquals("/;jsessionid=12345", response.encodeURL("/"));
        assertEquals("/foo.html;jsessionid=12345#target", response.encodeURL("/foo.html#target"));
        assertEquals(";jsessionid=12345", response.encodeURL(""));
    } 

    @Test
    public void testSendRedirect()
            throws Exception
    {
        String[][] tests = {

        };

        int[] ports=new int[]{8080,80};
        String[] hosts=new String[]{null,"myhost","192.168.0.1","0::1"};
        for (int port : ports)
        {
            for (String host : hosts)
            {
                for (int i=0;i<tests.length;i++)
                {
                    
                    Response response = getResponse();
                    Request request = response.getHttpChannel().getRequest();

                    request.setScheme("http");
                    if (host!=null)
                        request.setAuthority(host,port);
                    request.setURIPathQuery("/path/info;param;jsessionid=12345?query=0&more=1#target");
                    request.setContextPath("/path");
                    request.setRequestedSessionId("12345");
                    request.setRequestedSessionIdFromCookie(i>2);
                    SessionHandler handler = new SessionHandler();
                    
                    NullSessionDataStore ds = new NullSessionDataStore();
                    DefaultSessionCache ss = new DefaultSessionCache(handler);
                    handler.setSessionCache(ss);
                    ss.setSessionDataStore(ds);
                    DefaultSessionIdManager idMgr = new DefaultSessionIdManager(_server);
                    idMgr.setWorkerName(null);
                    handler.setSessionIdManager(idMgr);
                    request.setSessionHandler(handler);
                    request.setSession(new TestSession(handler, "12345"));
                    handler.setCheckingRemoteSessionIdEncoding(false);

                    response.sendRedirect(tests[i][0]);

                    String location = response.getHeader("Location");
                    
                    String expected = tests[i][1]
                        .replace("@HOST@",host==null ? request.getLocalAddr() : (host.contains(":")?("["+host+"]"):host ))
                        .replace("@PORT@",host==null ? ":8888" : (port==80?"":(":"+port)));
                    assertEquals("test-"+i+" "+host+":"+port,expected,location);
                }
            }
        }
    } 

	private Map<String, Object> getContextAttributes(final BundleContext bundleContext) {
		final Map<String, Object> attributes = new HashMap<>();
		if (contextAttributes != null) {
			attributes.putAll(contextAttributes);
		}
		attributes.put(WebContainerConstants.BUNDLE_CONTEXT_ATTRIBUTE, bundleContext);
		attributes.put("org.springframework.osgi.web.org.osgi.framework.BundleContext", bundleContext);
		return attributes;
	} 

Advertisement
Javadoc
DefaultSessionIdManager Manages session ids to ensure each session id within a context is unique, an

d that session ids can be shared across contexts (but not session contents). There is only 1 session id manager per Server instance. Runs a HouseKeeper thread to periodically check for expired Sessions. @see HouseKeeper

Read More
Advertisement