Examples of PersistentManager


Examples of org.apache.catalina.session.PersistentManager

    public void initializePersistenceStrategy(Context ctx, SessionManager smBean) {
        super.initializePersistenceStrategy(ctx, smBean);
       
        Object[] params = { ctx.getPath() };
        _logger.log(Level.INFO, "webcontainer.filePersistence", params);
        PersistentManager mgr = new PersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //FIXME: what is the replacement for setCheckInterval
        //mgr.setCheckInterval(reapInterval);       
        mgr.setMaxIdleBackup(0);           // FIXME: Make configurable

        FileStore store = new FileStore();
        //store.setCheckInterval(storeReapInterval);
        store.setDirectory(directory);
        mgr.setStore(store);
       
        //for intra-vm session locking
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new PESessionLockingStandardPipeline(sctx));       
       
        //special code for Java Server Faces
        if(ctx.findParameter(JSF_HA_ENABLED) == null) {
            ctx.addParameter(JSF_HA_ENABLED, "true");
        }       
        //START OF 6364900
        mgr.setSessionLocker(new PESessionLocker(ctx));
        //END OF 6364900       
        ctx.setManager(mgr);
       
        //this must be after ctx.setManager(mgr);
        //StandardContext sctx = (StandardContext) ctx;       
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }       
    }   
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

     *                if an exception occurs while storing
     */
    public void storeChilds(PrintWriter aWriter, int indent, Object aManager,
            StoreDescription parentDesc) throws Exception {
        if (aManager instanceof PersistentManager) {
            PersistentManager manager = (PersistentManager) aManager;

            // Store nested <Manager> elements
            Store store = manager.getStore();
            storeElement(aWriter, indent, store);

        }
    }
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

                + LF.LINE_SEPARATOR + "</Context>\r\n";
        check(aspectedResult);
    }

    public void testPersistentManagerStore() throws Exception {
        PersistentManager manager = new PersistentManager();
        manager.setSaveOnRestart(false);
        standardContext.setManager(manager);
        String aspectedResult = "<Context"
                + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\""
                + LF.LINE_SEPARATOR
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

                + "</Context>" + LF.LINE_SEPARATOR;
        check(aspectedResult);
    }

    public void testPersistentManagerFileStore() throws Exception {
        PersistentManager manager = new PersistentManager();
        manager.setSaveOnRestart(false);
        FileStore store = new FileStore();
        manager.setStore(store);
        standardContext.setManager(manager);
        String aspectedResult = "<Context"
                + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\""
                + LF.LINE_SEPARATOR
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

     *                if an exception occurs while storing
     */
    public void storeChilds(PrintWriter aWriter, int indent, Object aManager,
            StoreDescription parentDesc) throws Exception {
        if (aManager instanceof PersistentManager) {
            PersistentManager manager = (PersistentManager) aManager;

            // Store nested <Manager> elements
            Store store = manager.getStore();
            storeElement(aWriter, indent, store);

        }
    }
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

                + LF.LINE_SEPARATOR + "</Context>\r\n";
        check(aspectedResult);
    }

    public void testPersistentManagerStore() throws Exception {
        PersistentManager manager = new PersistentManager();
        manager.setSaveOnRestart(false);
        standardContext.setManager(manager);
        String aspectedResult = "<Context"
                + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\""
                + LF.LINE_SEPARATOR
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

                + "</Context>" + LF.LINE_SEPARATOR;
        check(aspectedResult);
    }

    public void testPersistentManagerFileStore() throws Exception {
        PersistentManager manager = new PersistentManager();
        manager.setSaveOnRestart(false);
        FileStore store = new FileStore();
        manager.setStore(store);
        standardContext.setManager(manager);
        String aspectedResult = "<Context"
                + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\""
                + LF.LINE_SEPARATOR
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

     *                if an exception occurs while storing
     */
    public void storeChilds(PrintWriter aWriter, int indent, Object aManager,
            StoreDescription parentDesc) throws Exception {
        if (aManager instanceof PersistentManager) {
            PersistentManager manager = (PersistentManager) aManager;

            // Store nested <Manager> elements
            Store store = manager.getStore();
            storeElement(aWriter, indent, store);

        }
    }
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

     */
    @Override
    public void storeChildren(PrintWriter aWriter, int indent, Object aManager,
            StoreDescription parentDesc) throws Exception {
        if (aManager instanceof PersistentManager) {
            PersistentManager manager = (PersistentManager) aManager;

            // Store nested <Manager> elements
            Store store = manager.getStore();
            storeElement(aWriter, indent, store);

        }
    }
View Full Code Here

Examples of org.apache.catalina.session.PersistentManager

            _logger.log(Level.INFO, FILE_PERSISTENCE, ctx.getPath());
        }

        super.initializePersistenceStrategy(ctx, smBean, serverConfigLookup);

        PersistentManager mgr = new PersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        mgr.setMaxIdleBackup(0);     // FIXME: Make configurable

        FileStore store = new FileStore();
        store.setDirectory(directory);
        mgr.setStore(store);
       
        //START OF 6364900
        mgr.setSessionLocker(new PESessionLocker(ctx));
        //END OF 6364900       

        ctx.setManager(mgr);

        if(!((StandardContext)ctx).isSessionTimeoutOveridden()) {
            mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }

        // Special code for Java Server Faces
        if (ctx.findParameter(JSF_HA_ENABLED) == null) {
            ctx.addParameter(JSF_HA_ENABLED, "true");
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.