This closes #1059
This commit is contained in:
commit
3a9e7ec47e
|
@ -60,6 +60,8 @@ public class Create extends InputAbstract {
|
||||||
|
|
||||||
private static final Integer HQ_PORT = 5445;
|
private static final Integer HQ_PORT = 5445;
|
||||||
|
|
||||||
|
public static final String HTTP_HOST = "localhost";
|
||||||
|
|
||||||
public static final Integer HTTP_PORT = 8161;
|
public static final Integer HTTP_PORT = 8161;
|
||||||
|
|
||||||
private static final Integer MQTT_PORT = 1883;
|
private static final Integer MQTT_PORT = 1883;
|
||||||
|
@ -105,6 +107,9 @@ public class Create extends InputAbstract {
|
||||||
@Option(name = "--host", description = "The host name of the broker (Default: 0.0.0.0 or input if clustered)")
|
@Option(name = "--host", description = "The host name of the broker (Default: 0.0.0.0 or input if clustered)")
|
||||||
String host;
|
String host;
|
||||||
|
|
||||||
|
@Option(name = "--http-host", description = "The host name to use for embedded web server (Default: localhost)")
|
||||||
|
String httpHost = HTTP_HOST;
|
||||||
|
|
||||||
@Option(name = "--ping", description = "A comma separated string to be passed on to the broker config as network-check-list. The broker will shutdown when all these addresses are unreachable.")
|
@Option(name = "--ping", description = "A comma separated string to be passed on to the broker config as network-check-list. The broker will shutdown when all these addresses are unreachable.")
|
||||||
String ping;
|
String ping;
|
||||||
|
|
||||||
|
@ -631,6 +636,7 @@ public class Create extends InputAbstract {
|
||||||
filters.put("${stomp.port}", String.valueOf(STOMP_PORT + portOffset));
|
filters.put("${stomp.port}", String.valueOf(STOMP_PORT + portOffset));
|
||||||
filters.put("${hq.port}", String.valueOf(HQ_PORT + portOffset));
|
filters.put("${hq.port}", String.valueOf(HQ_PORT + portOffset));
|
||||||
filters.put("${mqtt.port}", String.valueOf(MQTT_PORT + portOffset));
|
filters.put("${mqtt.port}", String.valueOf(MQTT_PORT + portOffset));
|
||||||
|
filters.put("${http.host}", httpHost);
|
||||||
filters.put("${http.port}", String.valueOf(httpPort + portOffset));
|
filters.put("${http.port}", String.valueOf(httpPort + portOffset));
|
||||||
filters.put("${data.dir}", data);
|
filters.put("${data.dir}", data);
|
||||||
filters.put("${max-hops}", String.valueOf(maxHops));
|
filters.put("${max-hops}", String.valueOf(maxHops));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- The web server is only bound to loalhost by default -->
|
<!-- The web server is only bound to loalhost by default -->
|
||||||
<web bind="${web.protocol}://localhost:${http.port}" path="web"${extra.web.attributes}>
|
<web bind="${web.protocol}://${http.host}:${http.port}" path="web"${extra.web.attributes}>
|
||||||
<app url="jolokia" war="jolokia-war-1.3.5.war"/>
|
<app url="jolokia" war="jolokia-war-1.3.5.war"/>
|
||||||
</web>
|
</web>
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class ArtemisTest extends CliTestBase {
|
||||||
Element webElem = (Element) config.getElementsByTagName("web").item(0);
|
Element webElem = (Element) config.getElementsByTagName("web").item(0);
|
||||||
|
|
||||||
String bindAttr = webElem.getAttribute("bind");
|
String bindAttr = webElem.getAttribute("bind");
|
||||||
String bindStr = "http://localhost:" + Create.HTTP_PORT;
|
String bindStr = "http://" + Create.HTTP_HOST + ":" + Create.HTTP_PORT;
|
||||||
|
|
||||||
assertEquals(bindAttr, bindStr);
|
assertEquals(bindAttr, bindStr);
|
||||||
//no any of those
|
//no any of those
|
||||||
|
|
Loading…
Reference in New Issue