CacheContainer cacheManager1 = TestCacheManagerFactory.createClusteredCacheManager(gcb1, defaultConfig,
new TransportFlags(), true);
cacheManager1.start();
GlobalConfigurationBuilder gcb2 = GlobalConfigurationBuilder.defaultClusteredBuilder();
gcb2.globalJmxStatistics()
.enable()
.allowDuplicateDomains(true)
.jmxDomain(JMX_DOMAIN)
.mBeanServerLookup(new PerThreadMBeanServerLookup());
CacheContainer cacheManager2 = TestCacheManagerFactory.createClusteredCacheManager(gcb2, defaultConfig,