Examples of JChannelFactory


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

   {     
      super.setUp();
     
      if (this.channelFactory == null)
      {
         this.channelFactory = new JChannelFactory();
         this.channelFactory.setMultiplexerConfig(this.jgConfig);
      }
     
      CacheManagerImpl jbcFactory = new CacheManagerImpl(this.jbcConfig, this.channelFactory);
      this.cacheManagerRef.set(jbcFactory);
View Full Code Here

Examples of org.jgroups.JChannelFactory

        Cache remoteCache = DefaultCacheFactory.getInstance().createCache(SharedCacheInstanceManager.DEFAULT_CACHE_RESOURCE, false);
       
        // This test assumes replication; verify that's correct
        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
View Full Code Here

Examples of org.jgroups.JChannelFactory

            // Get path to JGroups configuration
            String jgroupsConfigurationFilePath = parameterEntry.getParameterValue(JGROUPS_CONFIG);
            if (jgroupsConfigurationFilePath != null)
            {
               // Create and inject multiplexer factory
               JChannelFactory muxFactory = new JChannelFactory();
               muxFactory.setMultiplexerConfig(configurationManager.getResource(jgroupsConfigurationFilePath));
               cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(muxFactory);
               log.info("Multiplexer stack successfully enabled for the cache.");
            }
         }
         catch (Exception e)
View Full Code Here

Examples of org.jgroups.JChannelFactory

   {     
      super.setUp();
     
      if (this.channelFactory == null)
      {
         this.channelFactory = new JChannelFactory();
         this.channelFactory.setMultiplexerConfig(this.jgConfig);
      }
     
      CacheManagerImpl jbcFactory = new CacheManagerImpl(this.jbcConfig, this.channelFactory);
      this.cacheManagerRef.set(jbcFactory);
View Full Code Here

Examples of org.jgroups.JChannelFactory

        Cache remoteCache = DefaultCacheFactory.getInstance().createCache(SharedCacheInstanceManager.DEFAULT_CACHE_RESOURCE, false);
       
        // This test assumes replication; verify that's correct
        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
View Full Code Here

Examples of org.jgroups.JChannelFactory

    *
    * @throws Exception
    */
   public void testBasic() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml"); // the default stacks in jgroups.jar
      CacheManagerImpl registry = new CacheManagerImpl(DEFAULT_CONFIGURATION_FILE, cf);
      registry.start();

      ConfigurationRegistry configRegistry = registry.getConfigurationRegistry();

View Full Code Here

Examples of org.jgroups.JChannelFactory

      assertEquals(cacheNames, registry.getConfigurationNames());
   }

   public void testNullConfigResource() throws Exception
   {
      JChannelFactory cf = new JChannelFactory();
      cf.setMultiplexerConfig("stacks.xml"); // the default stacks in jgroups.jar
      String configResource = null;
      CacheManagerImpl registry = new CacheManagerImpl(configResource, cf);
      registry.start();

      assertEquals("No configs", 0, registry.getConfigurationNames().size());
View Full Code Here

Examples of org.jgroups.JChannelFactory

   public ChannelFactory createMuxChannelFactory(String muxConfig) throws Exception
   {
      synchronized (factories)
      {
         muxConfig = new UnitTestCacheFactory().mangleClusterConfiguration(muxConfig);
         JChannelFactory factory = new JChannelFactory();
         factory.setDomain("jbc.mux.test");
         factory.setExposeChannels(false);
         factory.setMultiplexerConfig(getClusterConfigElement(muxConfig));

         factories.add(factory);

         return factory;
      }
View Full Code Here

Examples of org.jgroups.JChannelFactory

      // Fake a TM by making a bogus proxy
      TransactionManager tm = (TransactionManager) Proxy.newProxyInstance(getClass().getClassLoader(),
            new Class[]{TransactionManager.class}, new MockInvocationHandler());
      wrapper.setTransactionManager(tm);
      ChannelFactory cf = new JChannelFactory();
      wrapper.setMuxChannelFactory(cf);

      RuntimeConfig rc = wrapper.getConfiguration().getRuntimeConfig();

      assertSame("Same TM", tm, wrapper.getTransactionManager());
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.