Examples of HAWebEventPersistentManager


Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceType = "ha";
        String persistenceFrequency = "on-demand";
        String persistenceScope = "modified-attribute";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //mgr.setCheckInterval(reapInterval); //FIXME: put this back
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAAttributeStore store = new HAAttributeStore();
        //store.setCheckInterval(storeReapInterval);  //FIXME: put this back
        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);
        _logger.finest("UUID_GENERATOR = " + generator);
       
        //for intra-vm session locking
        _logger.finest("sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx))");
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.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);
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }        
       
        //add SessionFactory
        mgr.setSessionFactory(new ModifiedAttributeSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /*
        HAAttributeStoreFactory haStoreFactory = new HAAttributeStoreFactory();       
        _logger.finest("haStoreFactory  : "+haStoreFactory.getClass());
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAAttributeStoreFactory();
        _logger.finest("haStoreFactory  : "+haStoreFactory.getClass());
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);         
              
        //add container listener for hooking sync calls
        ctx.addContainerListener(new HASyncContainerListener(mgr));
       
    }                  
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceFrequency = "on-demand";
        String persistenceScope = "session";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        //ok to use this manager for this
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //mgr.setCheckInterval(reapInterval);  //FIXME put this back
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAStore store = new HAStore();
        //store.setCheckInterval(storeReapInterval);    //FIXME: put this back

        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);

        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.addParameter(JSF_HA_ENABLED, "true");
        }        
        //START OF 6364900
        mgr.setSessionLocker(new PESessionLocker(ctx));
        //END OF 6364900       
        ctx.setManager(mgr);
       
        //add SessionFactory
        mgr.setSessionFactory(new FullSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /*
        HAStoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);        
       
        //add container listener for hooking sync calls
        ctx.addContainerListener(new HASyncContainerListener(mgr));
               
    }       
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceType = "ha";
        String persistenceFrequency = "web-method";
        String persistenceScope = "modified-session";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //mgr.setCheckInterval(reapInterval); //FIXME: put this back
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAStore store = new HAStore();
        //store.setCheckInterval(storeReapInterval);  //FIXME: put this back
        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);
        _logger.finest("UUID_GENERATOR = " + generator);       

        //for intra-vm session locking
        _logger.finest("sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx))");
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.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);
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }         
       
        //add SessionFactory
        mgr.setSessionFactory(new ModifiedSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /* FIXME remove after testing
        HAStoreFactory haStoreFactory = new HAFullSessionStoreFactory();       
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);         
               
        //add HASessionStoreValve
        HASessionStoreValve hadbValve = new HASessionStoreValve();
        StandardContext stdCtx = (StandardContext) ctx;
        stdCtx.addValve(hadbValve);       
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceType = "ha";
        String persistenceFrequency = "web-method";
        String persistenceScope = "modified-attribute";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //mgr.setCheckInterval(reapInterval); //FIXME: put this back
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAAttributeStore store = new HAAttributeStore();
        //store.setCheckInterval(storeReapInterval);  //FIXME: put this back
        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);
        _logger.finest("UUID_GENERATOR = " + generator);
       
        //for intra-vm session locking
        _logger.finest("sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx))");
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.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);
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }        
       
        //add SessionFactory
        mgr.setSessionFactory(new ModifiedAttributeSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /*
        HAAttributeStoreFactory haStoreFactory = new HAAttributeStoreFactory();       
        _logger.finest("haStoreFactory  : "+haStoreFactory.getClass());
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAAttributeStoreFactory();
        _logger.finest("haStoreFactory  : "+haStoreFactory.getClass());
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);         
              
        //add HASessionStoreValve
        HASessionStoreValve hadbValve = new HASessionStoreValve();
        StandardContext stdCtx = (StandardContext) ctx;
        stdCtx.addValve(hadbValve);
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceType = "ha";
        String persistenceFrequency = "web-method";
        String persistenceScope = "session";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions)//FIXME: put this back
        //mgr.setCheckInterval(reapInterval);
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAStore store = new HAStore();
        //store.setCheckInterval(storeReapInterval);    //FIXME: put this back
        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);
        _logger.finest("UUID_GENERATOR = " + generator);
       
        //for intra-vm session locking
        _logger.finest("sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx))");
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.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);
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }
       
        //add SessionFactory
        mgr.setSessionFactory(new FullSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /*
        HAStoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);       
               
        //add HASessionStoreValve
        HASessionStoreValve hadbValve = new HASessionStoreValve();
        StandardContext stdCtx = (StandardContext) ctx;
        stdCtx.addValve(hadbValve);
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.HAWebEventPersistentManager

        String persistenceType = "ha";
        String persistenceFrequency = "on-demand";
        String persistenceScope = "modified-session";
        Object[] params = { ctx.getPath(), persistenceType, persistenceFrequency, persistenceScope };
        _logger.log(Level.INFO, "webcontainer.haPersistence", params);
        HAWebEventPersistentManager mgr = new HAWebEventPersistentManager();
        mgr.setMaxActiveSessions(maxSessions);
        //mgr.setCheckInterval(reapInterval); //FIXME: put this back
        mgr.setMaxIdleBackup(-1);           // FIXME: Make configurable

        HAStore store = new HAStore();
        //store.setCheckInterval(storeReapInterval);  //FIXME: put this back
        mgr.setStore(store);
       
        //in the future can set other implementations
        //of UuidGenerator in server.xml
        //even if not set it defaults to UuidGeneratorImpl
        ServerConfigLookup lookup = new ServerConfigLookup();
        UuidGenerator generator = lookup.getUuidGeneratorFromConfig();
        mgr.setUuidGenerator(generator);
        _logger.finest("UUID_GENERATOR = " + generator);       

        //for intra-vm session locking
        _logger.finest("sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx))");
        StandardContext sctx = (StandardContext) ctx;
        sctx.restrictedSetPipeline(new SessionLockingStandardPipeline(sctx));
       
        //special code for Java Server Faces
        if(sctx.findParameter(JSF_HA_ENABLED) == null) {
            sctx.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);
        if(!sctx.isSessionTimeoutOveridden()) {
           mgr.setMaxInactiveInterval(sessionMaxInactiveInterval);
        }         
       
        //add SessionFactory
        mgr.setSessionFactory(new ModifiedSessionFactory());
       
        //add HAStorePool
        ServerConfigReader configReader = new ServerConfigReader();

        int haStorePoolSize = configReader.getHAStorePoolSizeFromConfig();
        int haStorePoolUpperSize = configReader.getHAStorePoolUpperSizeFromConfig();
        int haStorePoolPollTime = configReader.getHAStorePoolPollTimeFromConfig();       

        /* FIXME remove after testing
        HAStoreFactory haStoreFactory = new HAFullSessionStoreFactory();       
        HAStorePool storePool =
            new HAStorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setHAStorePool(storePool);
         */
       
        StoreFactory haStoreFactory = new HAFullSessionStoreFactory();
        StorePool storePool =
            new StorePool(haStorePoolSize, haStorePoolUpperSize,
                haStorePoolPollTime, haStoreFactory);
        mgr.setStorePool(storePool);         
       
        //add container listener for hooking sync calls
        ctx.addContainerListener(new HASyncContainerListener(mgr));       
    }
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.