Package org.jboss.web.tomcat.service.session.distributedcache.ispn

Examples of org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManagerFactory


      if (cacheContainer == null)
      {
         throw new IllegalStateException("Failed to initialize distributedManagerFactory");
      }
     
      DistributedCacheManagerFactory factory = new DistributedCacheManagerFactory();
      CacheSource sessionCacheSource = new CacheSource()
      {
         @Override
         public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
         {
            return cacheContainer.getCache(manager.getName());
         }
      };
      CacheSource jvmRouteCacheSource = new CacheSource()
      {
         @Override
         public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
         {
            return cacheContainer.getCache(manager.getEngineName());
         }
      };
     
      factory.setSessionCacheSource(sessionCacheSource);
      factory.setJvmRouteCacheSource(jvmRouteCacheSource);
     
      JBossCacheManager<OutgoingDistributableSessionData> manager = new JBossCacheManager<OutgoingDistributableSessionData>(factory);
      manager.setSnapshotMode(SnapshotMode.INSTANT);
     
      setupContainer(warName, jvmRoute, manager);
View Full Code Here

TOP

Related Classes of org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManagerFactory

Copyright © 2018 www.massapicom. 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.