From d8403a5fadeb06c5d8a34d5fe183aec414528f8f Mon Sep 17 00:00:00 2001 From: sgehwolf Date: Fri, 18 Dec 2015 08:55:47 +0100 Subject: [PATCH] 6425769: Allow specifying an address to bind JMX remote connector Reviewed-by: jbachorik, dfuchs --- src/share/vm/services/diagnosticCommand.cpp | 6 ++++++ src/share/vm/services/diagnosticCommand.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/share/vm/services/diagnosticCommand.cpp b/src/share/vm/services/diagnosticCommand.cpp index b38da2eda..f9551c9ed 100644 --- a/src/share/vm/services/diagnosticCommand.cpp +++ b/src/share/vm/services/diagnosticCommand.cpp @@ -437,6 +437,10 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated ("config.file", "set com.sun.management.config.file", "STRING", false), + _jmxremote_host + ("jmxremote.host", + "set com.sun.management.jmxremote.host", "STRING", false), + _jmxremote_port ("jmxremote.port", "set com.sun.management.jmxremote.port", "STRING", false), @@ -516,6 +520,7 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated { _dcmdparser.add_dcmd_option(&_config_file); + _dcmdparser.add_dcmd_option(&_jmxremote_host); _dcmdparser.add_dcmd_option(&_jmxremote_port); _dcmdparser.add_dcmd_option(&_jmxremote_rmi_port); _dcmdparser.add_dcmd_option(&_jmxremote_ssl); @@ -586,6 +591,7 @@ void JMXStartRemoteDCmd::execute(DCmdSource source, TRAPS) { } PUT_OPTION(_config_file); + PUT_OPTION(_jmxremote_host); PUT_OPTION(_jmxremote_port); PUT_OPTION(_jmxremote_rmi_port); PUT_OPTION(_jmxremote_ssl); diff --git a/src/share/vm/services/diagnosticCommand.hpp b/src/share/vm/services/diagnosticCommand.hpp index 2ce410998..3fda34205 100644 --- a/src/share/vm/services/diagnosticCommand.hpp +++ b/src/share/vm/services/diagnosticCommand.hpp @@ -280,6 +280,7 @@ class JMXStartRemoteDCmd : public DCmdWithParser { // com.sun.management is omitted DCmdArgument _config_file; + DCmdArgument _jmxremote_host; DCmdArgument _jmxremote_port; DCmdArgument _jmxremote_rmi_port; DCmdArgument _jmxremote_ssl; -- GitLab