I am developing an application based on apache jackrabbit oak and indexing through Lucene, I know that oak provides various mbean for monitoring various components.
When I start my application and inspect it with VisualVM and its “MBeans” plugin, however, I do not see oak’s mbeans exposed, could you tell me how to create an oak repository programmatically and expose its mbeans?
I am not using OSGI
Here are the mbeans I see via VisualVM:
Translated with DeepL.com (free version)
I undesrtood that I have to do:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
Oak oak = new Oak(ns).with(mbs);
In this way mbeans appear on VisualVM, but in that way some mbeans failed to register, here it is the list (logs show stacktrace too), someone know how to disable those registrations or how to do fix them?
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.plugins.index.property.jmx.PropertyIndexAsyncReindexMBean] against name [org.apache.jackrabbit.oak:name=async,type=PropertyIndexAsyncReindex] (reg
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.plugins.index.counter.jmx.NodeCounterMBean] against name [org.apache.jackrabbit.oak:name=nodeCounter,type=NodeCounter] (register Oak.java 327)
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.api.jmx.QueryEngineSettingsMBean] against name [org.apache.jackrabbit.oak:name=settings,type=QueryEngineSettings] (register Oak.java 327)
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.query.stats.QueryStatsMBean] against name [org.apache.jackrabbit.oak:name=Oak Query Statistics (Extended),type=QueryStats] (register Oak.java 327)
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean] against name [org.apache.jackrabbit.oak:name=repository manager,type=RepositoryManagement] (register Oak.java 3
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.api.jmx.QueryStatManagerMBean] against name [org.apache.jackrabbit.oak:name=Oak Query Statistics,type=QueryStat] (register Oak.java 327)
Unexpected exception while registering MBean of type [interface org.apache.jackrabbit.oak.api.jmx.RepositoryStatsMBean] against name [org.apache.jackrabbit.oak:name=Oak Repository Statistics,type=RepositoryStats] (register Oak.java 327)