RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties

mandy chung mandy.chung at oracle.com
Tue Feb 20 20:21:01 UTC 2018


The code review and CSR review can be in parallel.  For this case,
I agree with Kumar to have CSR written that would help the code
review. Please specify the behavior and its relationship with
jcmd and other relevant diagnosability tools.


On 2/20/18 6:41 AM, Kumar Srinivasan wrote:
>
>>>> What is the behavior when -Dcom.sun.management.jmxremote.port=1234 
>>>> --start-management-agent port=2345 
>>>> -Dcom.sun.management.jmxremote.port=3456?
>>>>
>>>> What is the value of the system property 
>>>> com.sun.management.jmxremote.port at runtime?  What port number 
>>>> does the management server start with?
>>> As said earlier, values set via new flags override values set by -D 
>>> flags. So 2345 will be the value of 
>>> com.sun.management.jmxremote.port. Added a test case to validate that.

VM options are the last one wins if same option specified multiple 
times.  In this case, it could cause confusion (the last -D option sets 
the value to 3456 but it's set to a different value).

Why not taking the simplest approach - when --start-management-agent is 
set, it does not accept mixing the old way (i.e. does not accept the 
management properties to be set via -D)?   This RFE is to make the 
command-line simpler and ease-of-use.  I don't see any downside to 
migrate entirely to the new form.

Mandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180220/4592abaf/attachment-0001.html>


More information about the serviceability-dev mailing list