Package org.apache.catalina.session

Examples of org.apache.catalina.session.ManagerBase.findSessions()


     *       on the underlying sessions.
     */
    private void doImminentSessionTimeout(Context activeContext) {

        ManagerBase manager = (ManagerBase) activeContext.getManager();
        Session[] sessions = manager.findSessions();
        for (int i = 0; i < sessions.length; i++) {
            if (sessions[i]!=null && sessions[i].isValid()) {
                sessions[i].setMaxInactiveInterval(EXTRA_DELAY_SECS);
                // leave it to be expired by the manager
            }
View Full Code Here


        } catch (InterruptedException ie) {
            // ignored
        }

        // paranoid verification that active sessions have now gone
        sessions = manager.findSessions();
        assertTrue(sessions.length == 0);
    }

    /*
     * Force rapid timeout scanning for both webapps
View Full Code Here

     *       on the underlying sessions.
     */
    private void doImminentSessionTimeout(Context activeContext) {

        ManagerBase manager = (ManagerBase) activeContext.getManager();
        Session[] sessions = manager.findSessions();
        for (int i = 0; i < sessions.length; i++) {
            if (sessions[i]!=null && sessions[i].isValid()) {
                sessions[i].setMaxInactiveInterval(EXTRA_DELAY_SECS);
                // leave it to be expired by the manager
            }
View Full Code Here

            // ignored
        }

        // Paranoid verification that active sessions have now gone
        int count = 0;
        sessions = manager.findSessions();
        while (sessions.length != 0 && count < TIMEOUT_WAIT_SECS) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                // Ignore
View Full Code Here

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                // Ignore
            }
            sessions = manager.findSessions();
            count++;
        }

        sessions = manager.findSessions();
        assertTrue(sessions.length == 0);
View Full Code Here

            }
            sessions = manager.findSessions();
            count++;
        }

        sessions = manager.findSessions();
        assertTrue(sessions.length == 0);
    }

    /*
     * Force rapid timeout scanning for both webapps
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.