This is an automated email from the ASF dual-hosted git repository. luigidemasi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5098f0800ba4ee7ca994036453a1a06fe5f0c06d Author: Luigi De Masi <[email protected]> AuthorDate: Wed Sep 30 13:20:05 2026 +0200 CAMEL-24988: Prepare Switch destinations for management Prepare literal destination nodes before JMX performance-counter traversal. This keeps model getters side-effect-free while making each Switch destination available to management instrumentation. Co-authored-by: Codex <[email protected]> Signed-off-by: Luigi De Masi <[email protected]> --- .../org/apache/camel/management/JmxManagementLifecycleStrategy.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java b/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java index ef76c74cad79..fb4243c97a3c 100644 --- a/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java +++ b/core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java @@ -970,8 +970,10 @@ public class JmxManagementLifecycleStrategy extends ServiceSupport implements Li // Switch destinations are literal sends rather than nested processor outputs. if (processor instanceof SwitchDefinition sw) { for (var c : sw.getCases()) { + c.prepareToDefinition(); registerPerformanceCounters(route, c.getToDefinition(), registeredCounters); } + sw.prepareOtherwiseDefinition(); if (sw.getOtherwiseDefinition() != null) { registerPerformanceCounters(route, sw.getOtherwiseDefinition(), registeredCounters); }
