Hi Devs,
I was trying with ConsolidatedDataStoreCacheStats   MBean, As per
http://jackrabbit.apache.org/oak/docs/plugins/blobstore.html Caching Stats
Section.
I tried registreing Mbean as follows,

ConsolidatedDataStoreCacheStats cs=new ConsolidatedDataStoreCacheStats();
          MBeanServer server = ManagementFactory.getPlatformMBeanServer();
          ObjectName  objectName = new
ObjectName("org.apache.jackrabbit.oak.plugins:type=ConsolidatedDataStoreCacheStats,name=ConsolidatedDataStoreCacheStats");
          server.registerMBean(cs ,objectName);

But it was failing on registerMBean method with error
javax.management.NotCompliantMBeanException:MBean class
org.apache.jackrabbit.oak.plugins.blob.ConsolidatedDataStoreCacheStats does
not implement DynamicMBean
With debugging i came to know of following,
com.sun.jmx.mbeanserver.Introspector class, getStandardMBeanInterface
method gets Interface implemented by class and implementsMBean method of
class,returns the XXMBean interface or null if no such interface exists
implementsMBean does comparison based on name fully package qaulified class
name, and it fails over there as I/F ConsolidatedDataStoreCacheStatsMBean
is having different package qaulified class name.

Is there any way to register ConsolidatedDataStoreCacheStats?

Thanks in advacne..


Regards,
Vivek

Reply via email to