mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3858 fix npe on not found vvm jmx url
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1341945 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
144dda0308
commit
8b2875e19e
|
@ -341,6 +341,7 @@ public abstract class AbstractJmxCommand extends AbstractCommand {
|
||||||
context.print("Connecting to pid: " + pid);
|
context.print("Connecting to pid: " + pid);
|
||||||
|
|
||||||
String jmxUrl = findJMXUrlByProcessId(pid);
|
String jmxUrl = findJMXUrlByProcessId(pid);
|
||||||
|
if (jmxUrl != null) {
|
||||||
// If jmx url already specified
|
// If jmx url already specified
|
||||||
if (getJmxServiceUrl() != null) {
|
if (getJmxServiceUrl() != null) {
|
||||||
context.printException(new IllegalArgumentException("JMX URL already specified."));
|
context.printException(new IllegalArgumentException("JMX URL already specified."));
|
||||||
|
@ -352,6 +353,9 @@ public abstract class AbstractJmxCommand extends AbstractCommand {
|
||||||
context.printException(e);
|
context.printException(e);
|
||||||
tokens.clear();
|
tokens.clear();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
context.printInfo("failed to resolve jmxUrl for pid:" + pid + ", using default JMX url");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
context.printInfo("--pid option is not available for this VM, using default JMX url");
|
context.printInfo("--pid option is not available for this VM, using default JMX url");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue