Examples of HashSessionIdManager


Examples of org.eclipse.jetty.server.session.HashSessionIdManager

        // bind the jetty http handler with the context handler
        if (isSessionSupport) {        
            // If we have sessions, we need two handlers.
            if (sessionManager == null) {
                sessionManager = new HashSessionManager();
                HashSessionIdManager idManager = new HashSessionIdManager();
               
                try {
                    //for JETTY 7.5
                    sessionManager.getClass().getMethod("setSessionIdManager", SessionIdManager.class)
                        .invoke(sessionManager, idManager);
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

        // bind the jetty http handler with the context handler
        if (isSessionSupport) {        
            // If we have sessions, we need two handlers.
            if (sessionManager == null) {
                sessionManager = new HashSessionManager();
                HashSessionIdManager idManager = new HashSessionIdManager();
               
                try {
                    //for JETTY 7.5
                    sessionManager.getClass().getMethod("setSessionIdManager", SessionIdManager.class)
                        .invoke(sessionManager, idManager);
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

  public boolean start() {
    Server jetty = new Server(port);

    // use Random (/dev/urandom) instead of SecureRandom to generate session keys - otherwise Jetty may hang during startup waiting for enough entropy
    // see http://jira.codehaus.org/browse/JETTY-331 and http://docs.codehaus.org/display/JETTY/Connectors+slow+to+startup
    jetty.setSessionIdManager(new HashSessionIdManager(new Random()));
    WebAppContext context = new WebAppContext(jetty, "webapp", "");
    // Place the system loader into the servlet context. The webapp init
    // listener will find it there and create the D2RServer instance.
    D2RServer.storeSystemLoader(loader, context.getServletContext());
    try {
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

        ServletContextHandler context = new ServletContextHandler(server, CONTEXT_PATH, ServletContextHandler.SESSIONS);
        context.addServlet(servletHolder, SERVLET_PATH + "/*");

        if (nodeName != null)
        {
            AbstractSessionIdManager sessionIdManager = new HashSessionIdManager();
            sessionIdManager.setWorkerName(nodeName);
            server.setSessionIdManager(sessionIdManager);
        }

        return server;
    }
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

        assertEquals("http://myhost:8888/path/info;param?query=0&more=1#target", response.encodeURL("http://myhost:8888/path/info;param?query=0&more=1#target"));

        request.setRequestedSessionId("12345");
        request.setRequestedSessionIdFromCookie(false);
        HashSessionManager manager = new HashSessionManager();
        manager.setSessionIdManager(new HashSessionIdManager());
        request.setSessionManager(manager);
        request.setSession(new TestSession(manager, "12345"));

        manager.setCheckingRemoteSessionIdEncoding(false);
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

                    request.setURIPathQuery("/path/info;param;jsessionid=12345?query=0&more=1#target");
                    request.setContextPath("/path");
                    request.setRequestedSessionId("12345");
                    request.setRequestedSessionIdFromCookie(i>2);
                    HashSessionManager manager = new HashSessionManager();
                    manager.setSessionIdManager(new HashSessionIdManager());
                    request.setSessionManager(manager);
                    request.setSession(new TestSession(manager, "12345"));
                    manager.setCheckingRemoteSessionIdEncoding(false);

                    response.sendRedirect(tests[i][0]);
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

    public ClusteredSessionManager(SessionManager sessionManager) {
        this.sessionManager = sessionManager;

        String workerName = sessionManager.getNode().getName();
        workerName = workerName.replaceAll(" ", "");
        HashSessionIdManager sessionIdManager = new HashSessionIdManager();
        sessionIdManager.setWorkerName(workerName);
        setIdManager(sessionIdManager);

        sessionManager.registerListener(new MigrationListener());
    }
View Full Code Here

Examples of org.eclipse.jetty.server.session.HashSessionIdManager

        // bind the jetty http handler with the context handler
        if (isSessionSupport) {        
            // If we have sessions, we need two handlers.
            if (sessionManager == null) {
                sessionManager = new HashSessionManager();
                HashSessionIdManager idManager = new HashSessionIdManager();
               
                try {
                    //for JETTY 7.5
                    sessionManager.getClass().getMethod("setSessionIdManager", SessionIdManager.class)
                        .invoke(sessionManager, idManager);
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionIdManager

    public ClusteredSessionManager(SessionManager sessionManager) {
        this.sessionManager = sessionManager;

        String workerName = sessionManager.getNode().getName();
        workerName = workerName.replaceAll(" ", "");
        HashSessionIdManager sessionIdManager = new HashSessionIdManager();
        sessionIdManager.setWorkerName(workerName);
        setIdManager(sessionIdManager);

        sessionManager.registerListener(new MigrationListener());
    }
View Full Code Here

Examples of org.mortbay.jetty.servlet.HashSessionIdManager

        assertEquals("http://host:port/path/info;param?query=0&more=1#target",response.encodeRedirectUrl("http://host:port/path/info;param?query=0&more=1#target"));
      
        request.setRequestedSessionId("12345");
        request.setRequestedSessionIdFromCookie(false);
        AbstractSessionManager manager=new HashSessionManager();
        manager.setIdManager(new HashSessionIdManager());
        request.setSessionManager(manager);
        request.setSession(new TestSession(manager,"12345"));
       
        assertEquals("http://host:port/path/info;param;jsessionid=12345?query=0&more=1#target",response.encodeRedirectUrl("http://host:port/path/info;param?query=0&more=1#target"));
             
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.