try {
ObjectName statsObjName = new ObjectName(
jmxDomain + ":" + queryGroupName + ",component=Statistics");
JmxUtil.registerMBean(new StatisticsInfo(stats), statsObjName, mbeanServer);
} catch (Exception e) {
throw new CacheException(
"Unable to register query module statistics mbean", e);
}
// Register mass indexer MBean, picking metadata from repo
ManageableComponentMetadata metadata = metadataRepo
.findComponentMetadata(MassIndexer.class)
.toManageableComponentMetadata();
try {
// TODO: MassIndexer should be some kind of query cache component?
MapReduceMassIndexer maxIndexer = new MapReduceMassIndexer(cache, sf);
ResourceDMBean mbean = new ResourceDMBean(maxIndexer, metadata);
ObjectName massIndexerObjName = new ObjectName(jmxDomain + ":"
+ queryGroupName+ ",component=" + metadata.getJmxObjectName());
JmxUtil.registerMBean(mbean, massIndexerObjName, mbeanServer);
} catch (Exception e) {
throw new CacheException("Unable to create ", e);
}
}