Integrated: 8473: JMC silently connects to its own runtime if target runtime does not include management modules

Aymane Harmaz aharmaz at openjdk.org
Thu Dec 4 16:19:27 UTC 2025


On Thu, 27 Nov 2025 17:10:59 GMT, Aymane Harmaz <aharmaz at openjdk.org> wrote:

> 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" />

This pull request has now been integrated.

Changeset: 39ddd133
Author:    Aymane Harmaz <aharmaz at openjdk.org>
Committer: Marcus Hirt <hirt at openjdk.org>
URL:       https://git.openjdk.org/jmc/commit/39ddd1339e8fb4f231e80c137d0112415f22298a
Stats:     12 lines in 3 files changed: 0 ins; 3 del; 9 mod

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

Reviewed-by: hirt

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

PR: https://git.openjdk.org/jmc/pull/689


More information about the jmc-dev mailing list