You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2017/03/01 14:29:41 UTC
[1/2] activemq-artemis git commit: ARTEMIS-1008 - Allow web server
host to be set on create
Repository: activemq-artemis
Updated Branches:
refs/heads/master 70721dcd5 -> 3a9e7ec47
ARTEMIS-1008 - Allow web server host to be set on create
https://issues.apache.org/jira/browse/ARTEMIS-1008
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/2b369f9e
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/2b369f9e
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/2b369f9e
Branch: refs/heads/master
Commit: 2b369f9ef96adc19c31aa7cc2c6e6376c515b43f
Parents: 70721dc
Author: Andy Taylor <an...@gmail.com>
Authored: Wed Mar 1 10:19:49 2017 +0000
Committer: Andy Taylor <an...@gmail.com>
Committed: Wed Mar 1 10:19:49 2017 +0000
----------------------------------------------------------------------
.../java/org/apache/activemq/artemis/cli/commands/Create.java | 6 ++++++
.../artemis/cli/commands/etc/bootstrap-web-settings.txt | 2 +-
.../test/java/org/apache/activemq/cli/test/ArtemisTest.java | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b369f9e/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index cd42f80..5dae3c9 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -60,6 +60,8 @@ public class Create extends InputAbstract {
private static final Integer HQ_PORT = 5445;
+ public static final String HTTP_HOST = "localhost";
+
public static final Integer HTTP_PORT = 8161;
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)")
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.")
String ping;
@@ -631,6 +636,7 @@ public class Create extends InputAbstract {
filters.put("${stomp.port}", String.valueOf(STOMP_PORT + portOffset));
filters.put("${hq.port}", String.valueOf(HQ_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("${data.dir}", data);
filters.put("${max-hops}", String.valueOf(maxHops));
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b369f9e/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt
index 946b485..c4d83c8 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/bootstrap-web-settings.txt
@@ -1,4 +1,4 @@
<!-- 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"/>
</web>
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2b369f9e/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index 72e2ca3..803020c 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -157,7 +157,7 @@ public class ArtemisTest extends CliTestBase {
Element webElem = (Element) config.getElementsByTagName("web").item(0);
String bindAttr = webElem.getAttribute("bind");
- String bindStr = "http://localhost:" + Create.HTTP_PORT;
+ String bindStr = "http://" + Create.HTTP_HOST + ":" + Create.HTTP_PORT;
assertEquals(bindAttr, bindStr);
//no any of those
[2/2] activemq-artemis git commit: This closes #1059
Posted by jb...@apache.org.
This closes #1059
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3a9e7ec4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3a9e7ec4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3a9e7ec4
Branch: refs/heads/master
Commit: 3a9e7ec47e4df94db5377891e7cc1a047d48ec82
Parents: 70721dc 2b369f9
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Mar 1 08:29:24 2017 -0600
Committer: Justin Bertram <jb...@apache.org>
Committed: Wed Mar 1 08:29:24 2017 -0600
----------------------------------------------------------------------
.../java/org/apache/activemq/artemis/cli/commands/Create.java | 6 ++++++
.../artemis/cli/commands/etc/bootstrap-web-settings.txt | 2 +-
.../test/java/org/apache/activemq/cli/test/ArtemisTest.java | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------