ARTEMIS-336 don't hard-code instance path

This commit is contained in:
jbertram 2016-01-11 20:16:33 -06:00 committed by Clebert Suconic
parent ee962dc137
commit 1ad37ea2b1
2 changed files with 6 additions and 3 deletions

View File

@ -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("");

View File

@ -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