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 2015/02/26 16:15:40 UTC

[2/3] activemq-6 git commit: ActiveMQ6-82 Windows support for runtime config

ActiveMQ6-82 Windows support for runtime config

Adds activemq.conf.bat for configuring runtime options in Windows
environment.


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

Branch: refs/heads/master
Commit: 7936402aa1c995fad067404bd059bb340d322182
Parents: 5d72bef
Author: Martyn Taylor <mt...@redhat.com>
Authored: Thu Feb 26 12:39:02 2015 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Thu Feb 26 14:06:30 2015 +0000

----------------------------------------------------------------------
 .../src/main/resources/bin/activemq.cmd         | 41 +++++++++++---------
 .../src/main/resources/bin/activemq.conf.bat    | 34 ++++++++++++++++
 2 files changed, 56 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7936402a/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 f0bf3f2..731d708 100755
--- a/distribution/activemq/src/main/resources/bin/activemq.cmd
+++ b/distribution/activemq/src/main/resources/bin/activemq.cmd
@@ -47,25 +47,28 @@ echo.
 
 :RUN_JAVA
 
-if "%JVM_FLAGS%" == "" set JVM_FLAGS=-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration="file:%ACTIVEMQ_HOME%\config\logging.properties" -Djava.library.path="%ACTIVEMQ_HOME%/bin/lib/linux-i686:%ACTIVEMQ_HOME%/bin/lib/linux-x86_64"
-
-if "x%ACTIVEMQ_OPTS%" == "x" goto noACTIVEMQ_OPTS
-  set JVM_FLAGS=%JVM_FLAGS% %ACTIVEMQ_OPTS%
-:noACTIVEMQ_OPTS
-
-if "x%ACTIVEMQ_DEBUG%" == "x" goto noDEBUG
-  set JVM_FLAGS=%JVM_FLAGS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
-:noDEBUG
-
-if "x%ACTIVEMQ_PROFILE%" == "x" goto noPROFILE
-  set JVM_FLAGS=-agentlib:yjpagent %JVM_FLAGS%
-:noPROFILE
-
-rem set JMX_OPTS=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-
-set JVM_FLAGS=%JVM_FLAGS% %JMX_OPTS% -Dactivemq.home="%ACTIVEMQ_HOME%" -classpath "%ACTIVEMQ_HOME%\lib\*"
-
-"%_JAVACMD%" %JVM_FLAGS% org.apache.activemq.cli.ActiveMQ %*
+rem "Set Defaults."
+set JAVA_ARGS=-Xmx1024M
+set ACTIVEMQ_LOGGING_CONF="file:%ACTIVEMQ_HOME%\config\logging.properties"
+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 exist "%ACTIVEMQ_CONF%" (
+   call "%ACTIVEMQ_CONF%" %*
+) else (
+   echo Config file not found "%ACTIVEMQ_CONF%"
+)
+
+rem "Create full JVM Args"
+set JVM_ARGS=%JAVA_ARGS% -classpath %ACTIVEMQ_HOME%\lib\* -Dactivemq.home=%ACTIVEMQ_HOME% -Ddata.dir=%ACTIVEMQ_DATA_DIR% -Djava.util.logging.manager=%ACTIVEMQ_LOG_MANAGER% -Dlogging.configuration=%ACTIVEMQ_LOGGING_CONF% -Djava.library.path=%ACTIVEMQ_HOME%\lib\
+
+rem "Set Debug & Cluster props"
+if not "%DEBUG_ARGS%"=="" set JVM_ARGS=%JVM_ARGS% %DEBUG_ARGS%
+if not "%ACTIVEMQ_CLUSTER_PROPS%"=="" set JVM_ARGS=%JVM_ARGS% %ACTIVEMQ_CLUSTER_PROPS%
+
+"%_JAVACMD%" %JVM_ARGS% org.apache.activemq.cli.ActiveMQ %*
 
 :END
 endlocal

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7936402a/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
new file mode 100644
index 0000000..b1a231b
--- /dev/null
+++ b/distribution/activemq/src/main/resources/bin/activemq.conf.bat
@@ -0,0 +1,34 @@
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements.  See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership.  The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License.  You may obtain a copy of the License at
+rem
+rem   http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied.  See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+rem Path to logging configuration file
+set ACTIVEMQ_LOGGING_CONF=file:%ACTIVEMQ_HOME%\config\logging.properties
+
+rem Path to data directory
+set ACTIVEMQ_DATA_DIR=%ACTIVEMQ_HOME%\data
+
+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 Java Opts
+set JAVA_ARGS=-Xmx1024m
+
+rem Debug args: Uncomment to enable debug
+rem set DEBUG_ARGS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005