ObjectName objName = new ObjectName(JMX_DOMAIN + ":type=RemoteQuery,name="
+ ObjectName.quote("DefaultCacheManager")
+ ",component=" + ProtobufMetadataManager.OBJECT_NAME);
MBeanServer mBeanServer = PerThreadMBeanServerLookup.getThreadMBeanServer();
ProtobufMetadataManagerMBean protobufMetadataManagerMBean = JMX.newMBeanProxy(mBeanServer, objName, ProtobufMetadataManagerMBean.class);
protobufMetadataManagerMBean.registerProtofiles(
new String[]{"bank.proto","indexing.proto","descriptor.proto"},
new String[]{
read("/sample_bank_account/bank.proto"),
read("/infinispan/indexing.proto"),
read("/google/protobuf/descriptor.proto")