You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/01/12 04:57:00 UTC
[2/2] activemq-artemis git commit: ARTEMIS-336 don't hard-code
instance path
ARTEMIS-336 don't hard-code instance path
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/1ad37ea2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/1ad37ea2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/1ad37ea2
Branch: refs/heads/master
Commit: 1ad37ea2b17daa2bdb90cd865761ad6b0b7e40e6
Parents: ee962dc
Author: jbertram <jb...@apache.org>
Authored: Mon Jan 11 20:16:33 2016 -0600
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Jan 11 22:56:50 2016 -0500
----------------------------------------------------------------------
.../java/org/apache/activemq/artemis/cli/commands/Create.java | 6 ++++--
.../apache/activemq/artemis/cli/commands/etc/artemis.profile | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1ad37ea2/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 23e0fd1..0a95041 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
@@ -575,7 +575,6 @@ public class Create extends InputAbstract {
new File(directory, ETC_LOGIN_CONFIG_WITHOUT_GUEST).renameTo(new File(directory, ETC_LOGIN_CONFIG));
}
- filters.put("${login-config}", "-Djava.security.auth.login.config=" + path(directory, false) + "/etc/login.config");
write(ETC_ARTEMIS_ROLES_PROPERTIES, filters, false);
if (IS_WINDOWS) {
@@ -604,10 +603,13 @@ public class Create extends InputAbstract {
performAutoTune(filters, aio, dataFolder);
- write(ETC_BOOTSTRAP_XML, filters, false);
write(ETC_BROKER_XML, filters, false);
write(ETC_ARTEMIS_USERS_PROPERTIES, filters, false);
+ // we want this variable to remain unchanged so that it will use the value set in the profile
+ filters.remove("${artemis.instance}");
+ write(ETC_BOOTSTRAP_XML, filters, false);
+
context.out.println("");
context.out.println("You can now start the broker by executing: ");
context.out.println("");
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/1ad37ea2/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile
index c6ceeef..f734691 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile
@@ -16,6 +16,7 @@
# under the License.
ARTEMIS_HOME='${artemis.home}'
+ARTEMIS_INSTANCE='${artemis.instance}'
# Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced in broker.xml
#ARTEMIS_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"
@@ -23,7 +24,7 @@ ARTEMIS_HOME='${artemis.home}'
# Java Opts
-JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Xbootclasspath/a:$ARTEMIS_HOME/lib/${logmanager} ${login-config} ${java-opts}"
+JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Xbootclasspath/a:$ARTEMIS_HOME/lib/${logmanager} -Djava.security.auth.login.config=$ARTEMIS_INSTANCE/etc/login.config ${java-opts} -Dartemis.instance=$ARTEMIS_INSTANCE"
# Debug args: Uncomment to enable debug