RFR: 8473: JMC silently connects to its own runtime if target runtime does not include management modules
Aymane Harmaz
aharmaz at openjdk.org
Thu Nov 27 17:18:40 UTC 2025
This PR addresses the fallback behavior executed when the target jvm runtime does not contain management modules.
Instead of connecting to the jvm running JMC without informing the user, we explicitly tell the user what went wrong by letting the error propagate
The next screenshots show the new error messages for each feature when target jvm runtime does not contain management modules
JMX Console :
<img width="534" height="419" alt="jmx-console" src="https://github.com/user-attachments/assets/57c92ba9-75a3-4383-a545-19ba1749bc35" />
Flight recording :
<img width="534" height="419" alt="flight-recording" src="https://github.com/user-attachments/assets/65235113-6780-433f-a449-8d80e93de9f1" />
Dump Heap :
<img width="595" height="150" alt="dump-heap" src="https://github.com/user-attachments/assets/ba11bd57-9cd5-4f51-bb0d-5c2e8c1942db" />
JMC agent :
<img width="595" height="373" alt="jmc-agent" src="https://github.com/user-attachments/assets/9adcac52-4325-41c5-be4c-c29f3b9880ac" />
Control the remote jmx agent feature was behaving correctly on the right jvm process but in case of an error the root case was not clearly communicated to the user :
<img width="595" height="373" alt="previous-control-jmx-console" src="https://github.com/user-attachments/assets/859d2bb2-93f4-4e3c-8c70-61084e385d8e" />
In this PR the error message for controlling the remote jmx agent is explicitly displayed :
<img width="972" height="502" alt="control-jmx-agent" src="https://github.com/user-attachments/assets/e0e6f88a-99f8-43a4-80a7-95e7babbee5d" />
-------------
Commit messages:
- 8473: JMC silently connects to its own runtime if target runtime does not include management modules
Changes: https://git.openjdk.org/jmc/pull/689/files
Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=689&range=00
Issue: https://bugs.openjdk.org/browse/JMC-8473
Stats: 12 lines in 3 files changed: 0 ins; 3 del; 9 mod
Patch: https://git.openjdk.org/jmc/pull/689.diff
Fetch: git fetch https://git.openjdk.org/jmc.git pull/689/head:pull/689
PR: https://git.openjdk.org/jmc/pull/689
More information about the jmc-dev
mailing list