private Cache cache1;
private Cache cache2;
@Override
protected void createCacheManagers() throws Throwable {
GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
globalConfiguration.setExposeGlobalJmxStatistics(true);
globalConfiguration.setAllowDuplicateDomains(true);
globalConfiguration.setMBeanServerLookup(PerThreadMBeanServerLookup.class.getName());
globalConfiguration.setJmxDomain(JMX_DOMAIN);
EmbeddedCacheManager cacheManager1 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration);
registerCacheManager(cacheManager1);
GlobalConfiguration globalConfiguration2 = globalConfiguration.clone();
globalConfiguration2.setCacheManagerName("SecondDefaultCacheManager");
EmbeddedCacheManager cacheManager2 = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(globalConfiguration2);
registerCacheManager(cacheManager2);
Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC, true);
configuration.setExposeJmxStatistics(true);