org.apache.shiro.session.mgt.eis.CachingSessionDAO Java Examples
The following examples show how to use
org.apache.shiro.session.mgt.eis.CachingSessionDAO.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NexusWebSecurityManager.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
@Override public void destroy() { // underlying manager cannot be restarted, so avoid shutting it down when bouncing the service if (isShuttingDown()) { super.destroy(); } else { // null out the session cache to force it to be recreated on the next request after bouncing SessionDAO sessionDAO = ((NexusWebSessionManager) getSessionManager()).getSessionDAO(); if (sessionDAO instanceof CachingSessionDAO) { ((CachingSessionDAO) sessionDAO).setActiveSessionsCache(null); } } }
Example #2
Source File: ShiroJCacheManagerAdapterTest.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Test public void defaultShiroActiveSessionCacheConfigurationTest() throws Exception { when(cacheHelper.maybeCreateCache(anyString(), confCaptor.capture())).thenReturn(null); underTest.maybeCreateCache(CachingSessionDAO.ACTIVE_SESSION_CACHE_NAME); assertThat(confCaptor.getValue(), is(EternalExpiryPolicy.factoryOf())); }