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);