String jmxDomain = JmxUtil.buildJmxDomain(globalCfg, mBeanServer, groupName);
ComponentMetadataRepo metadataRepo = gcr.getComponentMetadataRepo();
ManageableComponentMetadata metadata = metadataRepo.findComponentMetadata(ProtobufMetadataManager.class)
.toManageableComponentMetadata();
try {
ResourceDMBean mBean = new ResourceDMBean(protobufMetadataManager, metadata);
ObjectName objName = new ObjectName(jmxDomain + ":" + groupName + ",component=" + metadata.getJmxObjectName());
protobufMetadataManager.setObjectName(objName);
JmxUtil.registerMBean(mBean, objName, mBeanServer);
} catch (Exception e) {
throw new CacheException("Unable to register ProtobufMetadataManager MBean", e);