// Resolve jmx domain to use for query mbeans
String queryGroupName = getQueryGroupName(cacheName);
jmxDomain = JmxUtil.buildJmxDomain(globalCfg, mbeanServer, queryGroupName);
// Register statistics MBean, but only enable if Infinispan config says so
Statistics stats = sf.getStatistics();
stats.setStatisticsEnabled(cfg.jmxStatistics().enabled());
try {
ObjectName statsObjName = new ObjectName(
jmxDomain + ":" + queryGroupName + ",component=Statistics");
JmxUtil.registerMBean(new StatisticsInfo(stats), statsObjName, mbeanServer);
} catch (Exception e) {