Package org.jboss.ha.framework.server

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


         System.setProperty("jbosstest.cluster.node0", System.getProperty("jbosstest.cluster.node0", "localhost"));
      }
     
      mbeanServer = MBeanServerFactory.createMBeanServer("jchannelfactorytest");
     
      factory = new JChannelFactory();
      factory.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory.setAssignLogicalAddresses(false);
      factory.setNodeAddress(InetAddress.getByName("localhost"));
      factory.setNamingServicePort(123);
      factory.setExposeChannels(true);
View Full Code Here


      if (jgroups_bind_addr == null)
      {
         System.setProperty("jbosstest.cluster.node0", System.getProperty("jbosstest.cluster.node0", "localhost"));
      }
     
      factory = new JChannelFactory();
      factory.setAssignLogicalAddresses(false);
      factory.setNodeAddress(InetAddress.getByName("localhost"));
      factory.setNamingServicePort(123);
      factory.setExposeChannels(false);
      factory.setManageReleasedThreadClassLoader(true);
View Full Code Here

      if (jgroups_bind_addr == null)
      {
         System.setProperty("jbosstest.cluster.node0", System.getProperty("jbosstest.cluster.node0", "localhost"));
      }
     
      factory1 = new JChannelFactory();
      factory1.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory1.setAssignLogicalAddresses(false);
      factory1.setNodeAddress(InetAddress.getByName("localhost"));
      factory1.setNamingServicePort(123);
      factory1.setExposeChannels(false);
      factory1.setManageReleasedThreadClassLoader(true);
      factory1.create();
      factory1.start();
      factory2 = new JChannelFactory();
      factory2.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory2.setAssignLogicalAddresses(false);
      factory2.setNodeAddress(InetAddress.getByName("localhost"));
      factory2.setNamingServicePort(456);
      factory2.setNodeName("node1");
View Full Code Here

         System.setProperty("jbosstest.cluster.node0", System.getProperty("jbosstest.cluster.node0", "localhost"));
      }
     
      mbeanServer = MBeanServerFactory.createMBeanServer("jchannelfactorytest");
     
      factory = new JChannelFactory();
      factory.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory.setAssignLogicalAddresses(false);
      factory.setNodeAddress(InetAddress.getByName("localhost"));
      factory.setNamingServicePort(123);
      factory.setExposeChannels(true);
View Full Code Here

         Thread.sleep(10000);
         log.info("router routing table = " + router.dumpRoutingTable());
         assertTrue("router is started", router.isStarted());
         assertTrue("router is running", router.isRunning());
        
         JChannelFactory factory1 = new JChannelFactory();
         factory1.setMultiplexerConfig(muxFile);
         factory1.setNamingServicePort(1099);
         factory1.setNodeName("node1");
         factory1.setExposeChannels(false);
         factory1.setExposeProtocols(false);
         factory1.setAddMissingSingletonName(false);
         factory1.create();
         factory1.start();
        
         partition1 = new InjectedChannelClusterPartition(factory1.createChannel(stackName));
         partition1.setPartitionName(partitionName);
         partition1.setStateTransferTimeout(30000);
         partition1.setMethodCallTimeout(60000);
         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.setAddMissingSingletonName(false);
         factory2.create();
         factory2.start();
        
         partition2 = new InjectedChannelClusterPartition(factory2.createChannel(stackName));
         partition2.setPartitionName(partitionName);
         partition2.setStateTransferTimeout(30000);
         partition2.setMethodCallTimeout(60000);
         partition2.setBindIntoJndi(false);
        
View Full Code Here

  
   private CacheManager getCacheManager() throws Exception
   {
      if (cacheManager == null)
      {
         JChannelFactory channelFactory = new JChannelFactory();
         ConfigurationRegistry registry = new DependencyInjectedConfigurationRegistry();
         cacheManager = new CacheManager(registry, channelFactory);
         cacheManager.start();
      }
      return cacheManager;
View Full Code Here

      if (jgroups_bind_addr == null)
      {
         System.setProperty("jbosstest.cluster.node0", System.getProperty("jbosstest.cluster.node0", "localhost"));
      }
     
      factory1 = new JChannelFactory();
      factory1.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory1.setAssignLogicalAddresses(false);
      factory1.setNodeAddress(InetAddress.getByName("localhost"));
      factory1.setNamingServicePort(123);
      factory1.setExposeChannels(false);
      factory1.setManageReleasedThreadClassLoader(true);
      factory1.create();
      factory1.start();
      factory2 = new JChannelFactory();
      factory2.setMultiplexerConfig("cluster/channelfactory/stacks.xml");
      factory2.setAssignLogicalAddresses(false);
      factory2.setNodeAddress(InetAddress.getByName("localhost"));
      factory2.setNamingServicePort(456);
      factory2.setNodeName("node1");
View Full Code Here

    *
    * @throws Exception
    */
   public void testBasic() 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();
     
      ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();
     
View Full Code Here

    *
    * @throws Exception
    */
   public void testBasicPojo() 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();
     
      ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();
     
View Full Code Here

    *
    * @throws Exception
    */
   public void testNullConfigResource() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig(DEFAULT_STACKS_FILE);
      String configResource = null;
      CacheManager registry = new CacheManager(configResource, cf);
      registry.start();
     
      assertEquals("No configs", 0, registry.getConfigurationNames().size());
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.