Example usage for org.apache.shiro.session.mgt.eis CachingSessionDAO ACTIVE_SESSION_CACHE_NAME

List of usage examples for org.apache.shiro.session.mgt.eis CachingSessionDAO ACTIVE_SESSION_CACHE_NAME

Introduction

In this page you can find the example usage for org.apache.shiro.session.mgt.eis CachingSessionDAO ACTIVE_SESSION_CACHE_NAME.

Prototype

String ACTIVE_SESSION_CACHE_NAME

To view the source code for org.apache.shiro.session.mgt.eis CachingSessionDAO ACTIVE_SESSION_CACHE_NAME.

Click Source Link

Document

The default active sessions cache name, equal to shiro-activeSessionCache .

Usage

From source file:org.sonatype.nexus.security.StatelessAndStatefulWebSessionManagerEhCacheTest.java

License:Open Source License

protected void verifyNoSessionStored() {
    super.verifyNoSessionStored();

    // use the EhCache API to verify no sessions are stored
    MatcherAssert.assertThat(cacheManager.getCache(CachingSessionDAO.ACTIVE_SESSION_CACHE_NAME).getSize(),
            is(0));/* w ww.ja va  2 s. c o m*/

}

From source file:org.sonatype.nexus.security.StatelessAndStatefulWebSessionManagerEhCacheTest.java

License:Open Source License

protected void verifySingleSessionStored(Serializable sessionId) {
    super.verifySingleSessionStored(sessionId);

    // use the EhCache API to verify 1 sessions are stored

    Cache cache = cacheManager.getCache(CachingSessionDAO.ACTIVE_SESSION_CACHE_NAME);

    MatcherAssert.assertThat(cache.getSize(), is(1));
    // again using the sessionId
    MatcherAssert.assertThat(cache.get(sessionId), notNullValue());

}