in fractions/javaee/jmx/src/main/java/org/wildfly/swarm/jmx/runtime/JMXRemotingConnectorEndpointSelector.java [86:129]
public void customize() {
JMXRemotingConnector remotingConnector = this.jmx.subresources().jmxRemotingConnector();
if (remotingConnector == null) {
if (this.remote == null) {
LOG.info("JMX not configured for remote access");
return;
}
this.jmx.jmxRemotingConnector();
remotingConnector = this.jmx.subresources().jmxRemotingConnector();
if (this.remote.equals("http")) {
remotingConnector.useManagementEndpoint(false);
} else if (this.remote.equals("management")) {
remotingConnector.useManagementEndpoint(true);
}
}
boolean requiresLegacyRemoting = false;
if (remotingConnector.useManagementEndpoint() == null) {
if (!this.management.isUnsatisfied()) {
LOG.info("JMX configured for remote connector: implicitly using management interface");
remotingConnector.useManagementEndpoint(true);
} else if (!this.undertow.isUnsatisfied()) {
LOG.info("JMX configured for remote connector: implicitly using standard interface");
remotingConnector.useManagementEndpoint(false);
} else {
requiresLegacyRemoting = true;
}
} else if (remotingConnector.useManagementEndpoint() && this.management.isUnsatisfied()) {
LOG.warn("JMX configured to use management endpoint, but io.thorntail:management not available. Disabling");
this.jmx.jmxRemotingConnector(() -> null);
} else if (this.undertow.isUnsatisfied()) {
requiresLegacyRemoting = true;
}
if (requiresLegacyRemoting) {
remotingConnector.useManagementEndpoint(false);
LOG.info("JMX configured for remote connector but neither management nor http interfaces available. Using legacy remoting.");
this.remoting.requireLegacyConnector(true);
}
}