RFR: 8473: JMC silently connects to its own runtime if target runtime does not include management modules [v2]

Aymane Harmaz aharmaz at openjdk.org
Thu Dec 4 10:17:23 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" />

Aymane Harmaz has updated the pull request incrementally with one additional commit since the last revision:

  Implemented review comment

-------------

Changes:
  - all: https://git.openjdk.org/jmc/pull/689/files
  - new: https://git.openjdk.org/jmc/pull/689/files/eb050da3..47cf417d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jmc&pr=689&range=01
 - incr: https://webrevs.openjdk.org/?repo=jmc&pr=689&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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