Example usage for org.apache.shiro.session.mgt SessionValidationScheduler enableSessionValidation

List of usage examples for org.apache.shiro.session.mgt SessionValidationScheduler enableSessionValidation

Introduction

In this page you can find the example usage for org.apache.shiro.session.mgt SessionValidationScheduler enableSessionValidation.

Prototype

void enableSessionValidation();

Source Link

Document

Enables the session validation job.

Usage

From source file:org.obiba.opal.core.service.security.OpalSecurityManagerFactory.java

License:Open Source License

private void setDefaultSessionManager(DefaultSecurityManager dsm) {
    DefaultSessionManager sessionManager = (DefaultSessionManager) dsm.getSessionManager();
    sessionManager.setSessionListeners(sessionListeners);
    sessionManager.setSessionDAO(new EnterpriseCacheSessionDAO());
    SessionValidationScheduler sessionValidationScheduler = new ExecutorServiceSessionValidationScheduler();
    sessionValidationScheduler.enableSessionValidation();
    sessionManager.setSessionValidationScheduler(sessionValidationScheduler);
    sessionManager.setSessionValidationInterval(SESSION_VALIDATION_INTERVAL);
}