我正在开发一个基于apache jackrabbit Oak并通过Lucene进行索引的应用程序,我知道Oak提供了各种mbean来监控各种组件。
当我启动我的应用程序并使用 VisualVM 及其“MBeans”插件检查它时,我没有看到 Oak 的 mbean 公开,您能告诉我如何以编程方式创建 Oak 存储库并公开其 mbean 吗?
我没有使用OSGI
由 DeepL.com 翻译(免费版)
我明白我必须做:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
Oak oak = new Oak(ns).with(mbs);
以这种方式,mbeans出现在VisualVM上,但是这样一些mbeans无法注册,这是列表(日志也显示堆栈跟踪),有人知道如何禁用这些注册或如何修复它们?
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)