activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [05/11] activemq-6 git commit: fix scripts to allow a different environment to be set
Date Wed, 04 Mar 2015 15:02:09 GMT
fix scripts to allow a different environment to be set


Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/9e725457
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/9e725457
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/9e725457

Branch: refs/heads/master
Commit: 9e725457d6af54ab02be8349290608f4f94e7fa0
Parents: 8041f1f
Author: Andy Taylor <andytaylor@apache.org>
Authored: Wed Mar 4 12:28:20 2015 +0000
Committer: Andy Taylor <andytaylor@apache.org>
Committed: Wed Mar 4 12:28:32 2015 +0000

----------------------------------------------------------------------
 distribution/activemq/src/main/resources/bin/activemq   |  7 ++++++-
 .../activemq/src/main/resources/bin/activemq.cmd        |  2 +-
 .../activemq/src/main/resources/bin/activemq.conf       |  2 +-
 .../activemq/src/main/resources/bin/activemq.conf.bat   |  2 +-
 docs/user-manual/en/using-server.md                     | 12 ++++++++++++
 5 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e725457/distribution/activemq/src/main/resources/bin/activemq
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq b/distribution/activemq/src/main/resources/bin/activemq
index 74ca5da..ac08980 100755
--- a/distribution/activemq/src/main/resources/bin/activemq
+++ b/distribution/activemq/src/main/resources/bin/activemq
@@ -102,7 +102,12 @@ ACTIVEMQ_LOG_MANAGER=org.jboss.logmanager.LogManager
 JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M"
 
 # Load Runtime Config
-. $ACTIVEMQ_HOME/bin/activemq.conf
+if [ -z "$ACTIVEMQ_CONF" ] ; then
+   ACTIVEMQ_CONF=$ACTIVEMQ_HOME/bin/activemq.conf
+else
+   ACTIVEMQ_CONF="$ACTIVEMQ_CONF"
+fi
+. $ACTIVEMQ_CONF
 
 JAVA_ARGS="$JAVA_ARGS $ACTIVEMQ_CLUSTER_PROPS -Dactivemq.home=$ACTIVEMQ_HOME -Djava.library.path=$ACTIVEMQ_HOME/bin/lib/linux-i686:$ACTIVEMQ_HOME/bin/lib/linux-x86_64
-Ddata.dir=$ACTIVEMQ_DATA_DIR -Djava.util.logging.manager=$ACTIVEMQ_LOG_MANAGER -Dlogging.configuration=$ACTIVEMQ_LOGGING_CONF
$DEBUG_ARGS"
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e725457/distribution/activemq/src/main/resources/bin/activemq.cmd
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq.cmd b/distribution/activemq/src/main/resources/bin/activemq.cmd
index 731d708..f5b452b 100755
--- a/distribution/activemq/src/main/resources/bin/activemq.cmd
+++ b/distribution/activemq/src/main/resources/bin/activemq.cmd
@@ -54,7 +54,7 @@ set ACTIVEMQ_DATA_DIR="%ACTIVEMQ_HOME%\data"
 set ACTIVEMQ_LOG_MANAGER=org.jboss.logmanager.LogManager
 
 rem "Load Config"
-set ACTIVEMQ_CONF="%ACTIVEMQ_HOME%\bin\activemq.conf.bat"
+if "%ACTIVEMQ_CONF%" == "" set ACTIVEMQ_DATA="%ACTIVEMQ_HOME%\bin\activemq.conf.bat"
 if exist "%ACTIVEMQ_CONF%" (
    call "%ACTIVEMQ_CONF%" %*
 ) else (

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e725457/distribution/activemq/src/main/resources/bin/activemq.conf
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq.conf b/distribution/activemq/src/main/resources/bin/activemq.conf
index 9ac1e18..fbfa243 100644
--- a/distribution/activemq/src/main/resources/bin/activemq.conf
+++ b/distribution/activemq/src/main/resources/bin/activemq.conf
@@ -25,7 +25,7 @@ ACTIVEMQ_DATA_DIR=$ACTIVEMQ_HOME/data
 ACTIVEMQ_LOG_MANAGER=org.jboss.logmanager.LogManager
 
 # Cluster Properties: Used to pass arguments to ActiveMQ which can be referenced in activemq-configuration.xml
-#ACTIVEMQ_CLUSTER_PROPS="-Dactivemq.remoting.netty.port=61618"
+#ACTIVEMQ_CLUSTER_PROPS="-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673
-Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446"
 
 # Java Opts
 JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M"

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e725457/distribution/activemq/src/main/resources/bin/activemq.conf.bat
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq.conf.bat b/distribution/activemq/src/main/resources/bin/activemq.conf.bat
index b1a231b..c97ce3f 100644
--- a/distribution/activemq/src/main/resources/bin/activemq.conf.bat
+++ b/distribution/activemq/src/main/resources/bin/activemq.conf.bat
@@ -25,7 +25,7 @@ rem Log manager class
 set ACTIVEMQ_LOG_MANAGER=org.jboss.logmanager.LogManager
 
 rem Cluster Properties: Used to pass arguments to ActiveMQ.  These can be referenced in activemq-configuration.xml
-rem set ACTIVEMQ_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617
+rem set ACTIVEMQ_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673
-Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446
 
 rem Java Opts
 set JAVA_ARGS=-Xmx1024m

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e725457/docs/user-manual/en/using-server.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/using-server.md b/docs/user-manual/en/using-server.md
index 451a957..f4e6f1c 100644
--- a/docs/user-manual/en/using-server.md
+++ b/docs/user-manual/en/using-server.md
@@ -37,6 +37,18 @@ used. The configuration can be changed e.g. by running
 `./activemq run -- xml:../config/clustered/bootstrap.xml` or another
 config of your choosing.
 
+Environment variables are used to provide ease of changing ports, hosts and
+data directories used and can be found in `activemq.conf` on linux and
+`activemq.conf.bat` on Windows. A different properties file can be used by
+setting the property `ACTIVEMQ_CONF`, on linux this would be:
+
+      export ACTIVEMQ_CONF=myenv.env
+
+or on Windows
+
+      set ACTIVEMQ_CONF=myenv.env
+
+
 ## Server JVM settings
 
 The run scripts set some JVM settings for tuning the garbage collection


Mime
View raw message