Examples of MemoryConstrainedCacheManager


Examples of org.apache.shiro.cache.MemoryConstrainedCacheManager

        sm.setSubjectDAO(subjectDAO);

        final DefaultSessionManager defaultSessionManager = (DefaultSessionManager) sm.getSessionManager();
        defaultSessionManager.setSessionDAO(mongoDbSessionDAO);
        defaultSessionManager.setDeleteInvalidSessions(true);
        defaultSessionManager.setCacheManager(new MemoryConstrainedCacheManager());
        // DO NOT USE global session timeout!!! It's fucky.
        //defaultSessionManager.setGlobalSessionTimeout(TimeUnit.SECONDS.toMillis(5));

        SecurityUtils.setSecurityManager(sm);
    }
View Full Code Here

Examples of org.apache.shiro.cache.MemoryConstrainedCacheManager

    @Override
    protected void onInit() {
        super.onInit();
        securityDataProvider = BeanManagerProvider.getInstance().getContextualReference(SecurityDataProvider.class);
        setCacheManager(new MemoryConstrainedCacheManager());
        setCachingEnabled(true);
    }
View Full Code Here

Examples of org.apache.shiro.cache.MemoryConstrainedCacheManager

  public SillyRealm()
  {
    log.info("constructor...");
   
    // Only do authentication once for each request
    this.setCacheManager( new MemoryConstrainedCacheManager() );
  }
View Full Code Here

Examples of org.apache.shiro.cache.MemoryConstrainedCacheManager

  public SillyRealm()
  {
    log.info("constructor...");

    // Only do authentication once for each request
    setCacheManager(new MemoryConstrainedCacheManager());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.