Example usage for org.apache.shiro.web.session.mgt DefaultWebSessionManager setSessionValidationInterval

List of usage examples for org.apache.shiro.web.session.mgt DefaultWebSessionManager setSessionValidationInterval

Introduction

In this page you can find the example usage for org.apache.shiro.web.session.mgt DefaultWebSessionManager setSessionValidationInterval.

Prototype

public void setSessionValidationInterval(long sessionValidationInterval) 

Source Link

Document

If using the underlying default SessionValidationScheduler (that is, the #setSessionValidationScheduler(SessionValidationScheduler) setSessionValidationScheduler method is never called) , this method allows one to specify how frequently session should be validated (to check for orphans).

Usage

From source file:org.obiba.mica.security.SecurityManagerFactory.java

License:Open Source License

private void initializeSessionManager(DefaultWebSecurityManager dsm) {
    DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
    sessionManager.setSessionDAO(new EnterpriseCacheSessionDAO());
    sessionManager.setSessionValidationInterval(SESSION_VALIDATION_INTERVAL);
    sessionManager.setSessionValidationSchedulerEnabled(true);
    dsm.setSessionManager(sessionManager);
}