Package org.jboss.ha.framework.server

Examples of org.jboss.ha.framework.server.JChannelFactory


      assertEquals("No configs", 0, registry.getConfigurationNames().size());
   }
  
   public void testAliasing() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig(DEFAULT_STACKS_FILE);
      cf.setExposeChannels(false);
      cf.start();
      CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
      registry.start();

      Set<String> configNames = registry.getConfigurationNames();
      assertEquals(7, configNames.size());
View Full Code Here


      assertEquals(0, registry.getPojoCacheNames().size());     
   }
  
   public void testEagerStartCaches() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig(DEFAULT_STACKS_FILE);
      cf.setExposeChannels(false);
      cf.start();
      CacheManager registry = new CacheManager(DEFAULT_CONFIGURATION_FILE, cf);
     
      Set<String> cores = new HashSet<String>();
      cores.add("test1");
      cores.add("test2");
View Full Code Here

         // router characteristics here must match the definition in the stack configuration
         router = new GossipRouter(12001, "127.0.0.1");
         router.start();
         Thread.sleep(10000);
        
         JChannelFactory factory1 = new JChannelFactory();
         factory1.setMultiplexerConfig(muxFile);
         factory1.setNamingServicePort(1099);
         factory1.setNodeName("node1");
         factory1.setExposeChannels(false);
         factory1.setExposeProtocols(false);
         factory1.create();
         factory1.start();

         Configuration cacheConfig1 = new Configuration();
         cacheConfig1.setMultiplexerStack(stackName);
         cacheConfig1.setCacheMode("REPL_SYNC");
        
         DependencyInjectedConfigurationRegistry registry1 = new DependencyInjectedConfigurationRegistry();
         registry1.registerConfiguration("config1", cacheConfig1);        
        
         CacheManager cacheManager1 = new CacheManager(registry1, factory1);
        
         HAPartitionCacheHandlerImpl cacheHandler1 = new HAPartitionCacheHandlerImpl();
         cacheHandler1.setCacheManager(cacheManager1);
         cacheHandler1.setCacheConfigName("config1");
        
         DistributedStateImpl ds1 = new DistributedStateImpl();
         ds1.setCacheHandler(cacheHandler1);
        
         partition1 = new ClusterPartition();
         partition1.setPartitionName(partitionName);
         partition1.setCacheHandler(cacheHandler1);
         partition1.setStateTransferTimeout(30000);
         partition1.setMethodCallTimeout(60000);
         partition1.setDistributedStateImpl(ds1);
         partition1.setBindIntoJndi(false);
        
         partition1.create();        
         partition1.start();

         DistributedReplicantManager drm1 = partition1.getDistributedReplicantManager();

         Thread.sleep(10000);
        
         // Use a different stack name with the same config to avoid singleton conflicts
         stackName = "tunnel2";
        
         JChannelFactory factory2 = new JChannelFactory();
         factory2.setMultiplexerConfig(muxFile);
         factory2.setNamingServicePort(1099);
         factory2.setNodeName("node2");
         factory2.setExposeChannels(false);
         factory2.setExposeProtocols(false);
         factory2.create();
         factory2.start();
        
         Configuration cacheConfig2 = new Configuration();
         cacheConfig2.setMultiplexerStack(stackName);
         cacheConfig2.setCacheMode("REPL_SYNC");
        
View Full Code Here

TOP

Related Classes of org.jboss.ha.framework.server.JChannelFactory

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.