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

Marcus Hirt hirt at openjdk.org
Thu Dec 4 16:09:20 UTC 2025


On Thu, 4 Dec 2025 10:17:23 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" />
>
> Aymane Harmaz has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Implemented review comment

Marked as reviewed by hirt (Lead).

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

PR Review: https://git.openjdk.org/jmc/pull/689#pullrequestreview-3540779722


More information about the jmc-dev mailing list