Search in sources :

Example 1 with FileStore

use of org.apache.catalina.session.FileStore in project Payara by payara.

the class FileStrategyBuilder method initializePersistenceStrategy.

public void initializePersistenceStrategy(Context ctx, SessionManager smBean, ServerConfigLookup serverConfigLookup) {
    if (_logger.isLoggable(Level.INFO)) {
        _logger.log(Level.INFO, LogFacade.FILE_PERSISTENCE, ctx.getPath());
    }
    super.initializePersistenceStrategy(ctx, smBean, serverConfigLookup);
    PersistentManager mgr = new PersistentManager();
    mgr.setMaxActiveSessions(maxSessions);
    mgr.setMaxIdleBackup(maxIdleBackup);
    mgr.setMinIdleSwap(minIdleSwap);
    mgr.setMaxIdleSwap(maxIdleSwap);
    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");
    }
}
Also used : FileStore(org.apache.catalina.session.FileStore) PersistentManager(org.apache.catalina.session.PersistentManager)

Aggregations

FileStore (org.apache.catalina.session.FileStore)1 PersistentManager (org.apache.catalina.session.PersistentManager)1