Examples of JChannelFactory


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

Examples of org.jgroups.JChannelFactory

      registerWrapper(wrapper);

      wrapper = (CacheJmxWrapperMBean<String, String>) MBeanServerInvocationHandler.newProxyInstance(mBeanServer, mBeanName, CacheJmxWrapperMBean.class, false);
      wrapper.setMultiplexerStack(MultiplexerTestHelper.MUX_STACK + Thread.currentThread().getName());

      JChannelFactory factory = new JChannelFactory();
      factory.setDomain("jbc.mux.test");
      factory.setExposeChannels(false);
      factory.setMultiplexerConfig(MultiplexerTestHelper.getClusterConfigElement(getDefaultProperties()));

      ObjectName on = new ObjectName("jgroups:service=Mux");
      mBeanServer.registerMBean(new org.jgroups.jmx.JChannelFactory(factory), on);

      wrapper.setMultiplexerService((JChannelFactoryMBean) MBeanServerInvocationHandler.newProxyInstance(mBeanServer, on, JChannelFactoryMBean.class, false));
View Full Code Here

Examples of org.jgroups.JChannelFactory

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


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

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

Examples of org.jgroups.JChannelFactory

    volatile Thread thread=null;


    public void start(String props, long timeout) throws Exception {
        this.timeout=timeout;
        ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, timeout);
    }
View Full Code Here

Examples of org.jgroups.JChannelFactory

        if (cache == null) {
           
            if (channelFactory == null) {
                String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
                if (muxStacks != null) {
                    channelFactory = new JChannelFactory();
                    try {
                        channelFactory.setMultiplexerConfig(muxStacks);
                    }
                    catch (Exception e) {
                        throw new CacheException("Problem setting ChannelFactory config", e);
View Full Code Here

Examples of org.jgroups.JChannelFactory

            if (buildCaches && jbcFactory == null) {
                // See if the user configured a multiplexer stack
                if (channelFactory == null) {
                    String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
                    if (muxStacks != null) {
                        channelFactory = new JChannelFactory();
                        channelFactory.setMultiplexerConfig(muxStacks);
                    }
                }
               
                String factoryRes = PropertiesHelper.getString(CACHE_FACTORY_RESOURCE_PROP, properties, DEF_CACHE_FACTORY_RESOURCE);
View Full Code Here

Examples of org.jgroups.JChannelFactory

                String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, null);
                if (muxStacks == null) {
                  PropertiesHelper.getString(LEGACY_CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
                }
                if (muxStacks != null) {
                    channelFactory = new JChannelFactory();
                    try {
                        channelFactory.setMultiplexerConfig(muxStacks);
                    }
                    catch (Exception e) {
                        throw new CacheException("Problem setting ChannelFactory config", e);
View Full Code Here

Examples of org.jgroups.JChannelFactory

                    String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, null);
                    if (muxStacks == null) {
                      muxStacks = PropertiesHelper.getString(LEGACY_CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
                    }
                    if (muxStacks != null) {
                        channelFactory = new JChannelFactory();
                        channelFactory.setMultiplexerConfig(muxStacks);
                    }
                }
               
                String factoryRes = PropertiesHelper.getString(CACHE_FACTORY_RESOURCE_PROP, properties, null);
View Full Code Here

Examples of org.jgroups.JChannelFactory

 
 
  try {
      if(use_replicated_hashtable) {
    ht=new ReplicatedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    ((ReplicatedHashtable)ht).addNotifier(new Notifier(NUM_ITEMS));
      }
      else {
    ht=new DistributedHashtable("HashtableTest", new JChannelFactory(), props, 1000);
    // ((DistributedHashtable)ht).addNotifier(new MyNotifier());
      }

      System.out.println("Hashtable already has " + ht.size() + " items");
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.