You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2024/11/05 09:31:46 UTC
(jackrabbit-oak) branch trunk updated: Document mechanism for registering MBeans (#1818)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 17262f34b7 Document mechanism for registering MBeans (#1818)
17262f34b7 is described below
commit 17262f34b70b47d7c8a856d82d29f12ccc71c779
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Nov 5 10:31:39 2024 +0100
Document mechanism for registering MBeans (#1818)
It is not immediately obvious how the registerMBean method works so add a link to the Aries JMX whiteboard documentation.
---
.../java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java
index 1e8b8bb3c4..43aaa6b090 100644
--- a/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java
+++ b/oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardUtils.java
@@ -108,6 +108,8 @@ public class WhiteboardUtils {
table.put("type", JmxUtil.quoteValueIfRequired(type));
table.put("name", JmxUtil.quoteValueIfRequired(name));
+ // ensure the MBean is tracked by the Aries JMX Whiteboard
+ // https://aries.apache.org/documentation/modules/jmx.html#_whiteboard_support
ImmutableMap.Builder properties = ImmutableMap.builder();
properties.put("jmx.objectname", new ObjectName(JMX_OAK_DOMAIN, table));
properties.putAll(attrs);