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");
}
}
Aggregations