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