Examples of JChannelFactory


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

    *
    * @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

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

    *
    * @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

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

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

      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

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

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

Examples of org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.JChannelFactory

         ConditionFactory cf = new JMSConditionFactory();
                 
         FilterFactory ff = new SelectorFactory();
         FailoverMapper mapper = new DefaultFailoverMapper();

         JChannelFactory jChannelFactory = null;

         if (channelFactoryName != null)
         {
            Object info = null;
            try
View Full Code Here

Examples of org.jboss.messaging.core.plugin.postoffice.cluster.jchannelfactory.JChannelFactory

      //      See http://jira.jboss.org/jira/browse/JBMESSAGING-793
      String configFilePath = "server/default/deploy/clustered-mysql-persistence-service.xml";

      // TODO (ovidiu) we're temporarily ignoring the multiplex option, it doesn't work well
      boolean ignoreMultiplexer = true;
      JChannelFactory jChannelFactory =
         new ClusteredPersistenceServiceConfigFileJChannelFactory(configFilePath,
                                                                  ignoreMultiplexer,
                                                                  sc.getMBeanServer());

      DefaultClusteredPostOffice postOffice =
View Full Code Here

Examples of org.jgroups.JChannelFactory

        new DrawMultiplexer().start(props, stack_name);
    }


    private void start(String props, String stack_name) throws Exception {
        factory=new JChannelFactory();
        factory.setMultiplexerConfig(props);

        final Channel ch1, ch2;
        ch1=factory.createMultiplexerChannel(stack_name, "id-1");
        Draw draw1=new Draw(ch1);
View Full Code Here

Examples of org.jgroups.JChannelFactory

    }


    public static void main(String args[]) {
        DistributedHashtableDemo  client=new DistributedHashtableDemo();
        ChannelFactory            factory=new JChannelFactory();
        String                    arg;
        boolean                   persist=false;

        // test for pbcast
        /*
 
View Full Code Here

Examples of org.jgroups.JChannelFactory

    public static void main(String[] args)
    {
        String groupname = "QueueDemo";
        DistributedQueueDemo client = new DistributedQueueDemo();
        ChannelFactory factory = new JChannelFactory();
        String arg;
        String next_arg;
        boolean trace = false;
        boolean persist = false;
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.