Examples of DistributedCacheManagerFactory


Examples of org.jboss.as.clustering.web.DistributedCacheManagerFactory

                .addDependency(PathManagerService.SERVICE_NAME, PathManager.class, service.getPathManagerInjector())
                .addDependency(DependencyType.OPTIONAL, ServiceName.JBOSS.append("mbean", "server"), MBeanServer.class, service.getMbeanServer())
                .setInitialMode(Mode.ON_DEMAND)
                .install());

        final DistributedCacheManagerFactory factory = new DistributedCacheManagerFactoryService().getValue();
        if (factory != null) {
            final InjectedValue<WebServer> server = new InjectedValue<WebServer>();
            newControllers.add(target.addService(DistributedCacheManagerFactoryService.JVM_ROUTE_REGISTRY_ENTRY_PROVIDER_SERVICE_NAME, new JvmRouteRegistryEntryProviderService(server))
                    .addDependency(WebSubsystemServices.JBOSS_WEB, WebServer.class, server)
                    .setInitialMode(Mode.ON_DEMAND)
                    .install());
            newControllers.addAll(factory.installServices(target));
        }
    }
View Full Code Here

Examples of org.jboss.as.clustering.web.DistributedCacheManagerFactory

                builder.addDependencies(action.dependencies());
            }

            if (metaData.getDistributable() != null) {
                DistributedCacheManagerFactoryService factoryService = new DistributedCacheManagerFactoryService();
                DistributedCacheManagerFactory factory = factoryService.getValue();
                if (factory != null) {
                    ServiceName factoryServiceName = deploymentServiceName.append("session");
                    builder.addDependency(DependencyType.OPTIONAL, factoryServiceName, DistributedCacheManagerFactory.class, config.getDistributedCacheManagerFactoryInjector());

                    ServiceBuilder<DistributedCacheManagerFactory> factoryBuilder = serviceTarget.addService(factoryServiceName, factoryService);
                    boolean enabled = factory.addDependencies(serviceTarget, factoryBuilder, metaData);
                    factoryBuilder.setInitialMode(enabled ? ServiceController.Mode.ON_DEMAND : ServiceController.Mode.NEVER).install();
                }
            }

            builder.install();
View Full Code Here

Examples of org.jboss.as.clustering.web.infinispan.DistributedCacheManagerFactory

                return null;
            }
        };
        final RegistryService<String, Void> registry = new RegistryService<String, Void>(provider);
        registry.getCacheInjector().inject(jvmRouteCache);
        DistributedCacheManagerFactory factory = new DistributedCacheManagerFactory();
        factory.getCacheContainerInjector().inject(cacheContainer);
        factory.getCacheConfigurationInjector().inject(jvmRouteCache.getCacheConfiguration());
        factory.getRegistryInjector().inject(registry);
        factory.getLockManagerInjector().inject(((ExtendedCacheManager) cacheContainer).getLockManager());
       
        Engine engine = new MockEngine();
        engine.setName("jboss.web");
        engine.setJvmRoute(jvmRoute);
        Host host = new MockHost();
View Full Code Here

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
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.