ActiveMQ6-82 Windows support for runtime config

Adds activemq.conf.bat for configuring runtime options in Windows
environment.
This commit is contained in:
Martyn Taylor 2015-02-26 12:39:02 +00:00
parent 5d72befae3
commit 7936402aa1
2 changed files with 52 additions and 15 deletions

View File

@ -47,25 +47,28 @@ echo.
:RUN_JAVA :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" 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
if "x%ACTIVEMQ_OPTS%" == "x" goto noACTIVEMQ_OPTS rem "Load Config"
set JVM_FLAGS=%JVM_FLAGS% %ACTIVEMQ_OPTS% set ACTIVEMQ_CONF="%ACTIVEMQ_HOME%\bin\activemq.conf.bat"
:noACTIVEMQ_OPTS if exist "%ACTIVEMQ_CONF%" (
call "%ACTIVEMQ_CONF%" %*
) else (
echo Config file not found "%ACTIVEMQ_CONF%"
)
if "x%ACTIVEMQ_DEBUG%" == "x" goto noDEBUG rem "Create full JVM Args"
set JVM_FLAGS=%JVM_FLAGS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 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\
:noDEBUG
if "x%ACTIVEMQ_PROFILE%" == "x" goto noPROFILE rem "Set Debug & Cluster props"
set JVM_FLAGS=-agentlib:yjpagent %JVM_FLAGS% if not "%DEBUG_ARGS%"=="" set JVM_ARGS=%JVM_ARGS% %DEBUG_ARGS%
:noPROFILE if not "%ACTIVEMQ_CLUSTER_PROPS%"=="" set JVM_ARGS=%JVM_ARGS% %ACTIVEMQ_CLUSTER_PROPS%
rem set JMX_OPTS=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false "%_JAVACMD%" %JVM_ARGS% org.apache.activemq.cli.ActiveMQ %*
set JVM_FLAGS=%JVM_FLAGS% %JMX_OPTS% -Dactivemq.home="%ACTIVEMQ_HOME%" -classpath "%ACTIVEMQ_HOME%\lib\*"
"%_JAVACMD%" %JVM_FLAGS% org.apache.activemq.cli.ActiveMQ %*
:END :END
endlocal endlocal

View File

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