RFR: JDK-8187498: Add a -Xmanagement flag as syntactic sugar for -Dcom.sun.management.jmxremote.* properties
Harsha Wardhana B
harsha.wardhana.b at ORACLE.COM
Mon Jan 29 05:20:32 UTC 2018
Hi Mandy,Alan,
Thanks for your inputs.
If I keep it as launcher option, it may need to know JMX agent flags
which may need to be extended in future.
I would prefer making it a VM option. I will make the required changes
and send out an updated webrev.
-Harsha
On Thursday 25 January 2018 09:31 PM, mandy chung wrote:
> Hi Harsha,
>
> JEP 293 [1] describes the guidelines for JDK command-line options. As
> Alan points out, new options should move away from -X prefix but use
> `--` GNU-style long form option. The guideline says:
>
> The use of |-X| as a prefix to indicate "non-standard" options will be
> discontinued for new options, although command-line help may continue
> to draw a distinction between more commonly used options and those for
> advanced use.
>
> You can consider `--management` as an alternative. Should this be a
> launcher option that converts it to the corresponding
> `-Dcom.sun.management.jmxremote.<xxx>` rather than a VM option?
>
> Mandy
> [1] http://openjdk.java.net/jeps/293
>
> On 1/24/18 11:21 PM, Harsha Wardhana B wrote:
>>
>> Hi Erik,
>>
>> The minimal command line would be,
>>
>> "-Xmanagement", that will start only the local management server.
>>
>> "-Xmanagement:local=true,port=aaaa" will start the remote management
>> server without SSL or authentication.
>>
>>
>> On Wednesday 24 January 2018 06:13 PM, Erik Gahlin wrote:
>>> Hi Harsha,
>>>
>>> Very nice to see progress on this!
>>>
>>> Before reviewing, the minimal command line to start up the default
>>> management server now becomes
>>>
>>> -Xmanagement:ssl=false,authenticate=false
>> No. Please refer above for minimal options.
>>>
>>> and if you use a property that doesn't exist, or that is mandatory,
>>> you will get an error message stating what is wrong?
>> If we use property, that doesn't exist, we get invalid option error.
>> As said before, no options are mandatory.
>> /<log>//
>> //./java
>> -Xmanagement:ssl=true,authenticate=false,rmiregistry_ssl=true
>> HelloWorld//
>> //Error: Invalid option specified: rmiregistry_ssl//
>> //</log>/
>>>
>>> Could we reduce the command line further, so only a single property
>>> is needed:
>>>
>>> -Xmanagement:secure=false
>>>
>>> or perhaps:
>>>
>>> -Xmanagement:unsecure
>>>
>>> which would set ssl=false,authenticate=false, because that is what
>>> you want 99% of the time.
>>>
>>> Thanks
>>> Erik
>>>
>> Thanks
>> Harsha
>>>> Hi,
>>>>
>>>> Please review the changes for above enhancement having webrev at,
>>>>
>>>> http://cr.openjdk.java.net/~hb/8187498/webrev.00/
>>>>
>>>> Thanks
>>>> Harsha
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180129/c47b27d9/attachment.html>
More information about the serviceability-dev
mailing list