mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 23:45:59 +00:00
Adds new variables for activemq.conf and activemq.data to allow for easy externalization of configuration and data files. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1245654 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f0a673e36
commit
3a561cc8c7
@ -40,8 +40,6 @@ import java.util.StringTokenizer;
|
||||
/**
|
||||
* Main class that can bootstrap an ActiveMQ broker console. Handles command
|
||||
* line argument parsing to set up and run broker tasks.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
@ -64,7 +62,7 @@ public class Main {
|
||||
|
||||
// lets add the conf directory first, to find the log4j.properties just in case its not
|
||||
// in the activemq.classpath system property or some jar incorrectly includes one
|
||||
File confDir = new File(app.getActiveMQBase(), "conf");
|
||||
File confDir = app.getActiveMQConfig();
|
||||
app.addClassPath(confDir);
|
||||
|
||||
// Add the following to the classpath:
|
||||
@ -96,7 +94,6 @@ public class Main {
|
||||
}
|
||||
app.addExtensionDirectory(new File(homeLibDir, "optional"));
|
||||
app.addExtensionDirectory(new File(homeLibDir, "web"));
|
||||
|
||||
}
|
||||
|
||||
// Add any custom classpath specified from the system property
|
||||
@ -228,7 +225,7 @@ public class Main {
|
||||
buffer.append("k");
|
||||
System.out.println(" Heap sizes: " + buffer.toString());
|
||||
|
||||
List jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
|
||||
List<?> jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
|
||||
buffer = new StringBuilder();
|
||||
for (Object arg : jvmArgs) {
|
||||
buffer.append(" ").append(arg);
|
||||
@ -237,6 +234,8 @@ public class Main {
|
||||
|
||||
System.out.println("ACTIVEMQ_HOME: " + getActiveMQHome());
|
||||
System.out.println("ACTIVEMQ_BASE: " + getActiveMQBase());
|
||||
System.out.println("ACTIVEMQ_CONFIG: " + getActiveMQConfig());
|
||||
System.out.println("ACTIVEMQ_DATA: " + getActiveMQDataDir());
|
||||
|
||||
ClassLoader cl = getClassLoader();
|
||||
Thread.currentThread().setContextClassLoader(cl);
|
||||
@ -244,7 +243,7 @@ public class Main {
|
||||
// Use reflection to run the task.
|
||||
try {
|
||||
String[] args = tokens.toArray(new String[tokens.size()]);
|
||||
Class task = cl.loadClass(TASK_DEFAULT_CLASS);
|
||||
Class<?> task = cl.loadClass(TASK_DEFAULT_CLASS);
|
||||
Method runTask = task.getMethod("main", new Class[] {
|
||||
String[].class, InputStream.class, PrintStream.class
|
||||
});
|
||||
@ -299,8 +298,6 @@ public class Main {
|
||||
|
||||
for (Iterator<File> iter = activeMQClassPath.iterator(); iter.hasNext();) {
|
||||
File dir = iter.next();
|
||||
// try{ System.out.println("Adding to classpath: " +
|
||||
// dir.getCanonicalPath()); }catch(Exception e){}
|
||||
urls.add(dir.toURI().toURL());
|
||||
}
|
||||
|
||||
@ -310,25 +307,16 @@ public class Main {
|
||||
File[] files = dir.listFiles();
|
||||
if (files != null) {
|
||||
|
||||
// Sort the jars so that classpath built is
|
||||
// consistently
|
||||
// in the same order. Also allows us to use jar
|
||||
// names to control
|
||||
// classpath order.
|
||||
Arrays.sort(files, new Comparator() {
|
||||
public int compare(Object o1, Object o2) {
|
||||
File f1 = (File)o1;
|
||||
File f2 = (File)o2;
|
||||
// Sort the jars so that classpath built is consistently in the same
|
||||
// order. Also allows us to use jar names to control classpath order.
|
||||
Arrays.sort(files, new Comparator<File>() {
|
||||
public int compare(File f1, File f2) {
|
||||
return f1.getName().compareTo(f2.getName());
|
||||
}
|
||||
});
|
||||
|
||||
for (int j = 0; j < files.length; j++) {
|
||||
if (files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")) {
|
||||
// try{ System.out.println("Adding to
|
||||
// classpath: " +
|
||||
// files[j].getCanonicalPath());
|
||||
// }catch(Exception e){}
|
||||
urls.add(files[j].toURI().toURL());
|
||||
}
|
||||
}
|
||||
@ -393,4 +381,26 @@ public class Main {
|
||||
|
||||
return activeMQBase;
|
||||
}
|
||||
|
||||
public File getActiveMQConfig() {
|
||||
File activeMQConfig = null;
|
||||
|
||||
if (System.getProperty("activemq.conf") != null) {
|
||||
activeMQConfig = new File(System.getProperty("activemq.conf"));
|
||||
} else {
|
||||
activeMQConfig = new File(getActiveMQBase() + "/conf");
|
||||
}
|
||||
return activeMQConfig;
|
||||
}
|
||||
|
||||
public File getActiveMQDataDir() {
|
||||
File activeMQDataDir = null;
|
||||
|
||||
if (System.getProperty("activemq.data") != null) {
|
||||
activeMQDataDir = new File(System.getProperty("activemq.data"));
|
||||
} else {
|
||||
activeMQDataDir = new File(getActiveMQBase() + "/data");
|
||||
}
|
||||
return activeMQDataDir;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
<broker brokerName="web-console" useJmx="true" xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/kahadb"/>
|
||||
<kahaDB directory="${activemq.data}/kahadb"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
|
@ -90,8 +90,14 @@ if [ -z "$ACTIVEMQ_BASE" ] ; then
|
||||
fi
|
||||
|
||||
# Active MQ configuration directory
|
||||
if [ -z "$ACTIVEMQ_CONF" ] ; then
|
||||
# Preserve old configuration setting functionality.
|
||||
if [ -z "$ACTIVEMQ_CONFIG_DIR" ] ; then
|
||||
ACTIVEMQ_CONFIG_DIR="$ACTIVEMQ_BASE/conf"
|
||||
ACTIVEMQ_CONF="$ACTIVEMQ_BASE/conf"
|
||||
ACTIVEMQ_CONF_DIR="ACTIVEMQ_DATA"
|
||||
else
|
||||
ACTIVEMQ_CONF="$ACTIVEMQ_CONFIG_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure a user with non root priviledges, if no user is specified do not change user
|
||||
@ -99,9 +105,15 @@ if [ -z "$ACTIVEMQ_USER" ] ; then
|
||||
ACTIVEMQ_USER=""
|
||||
fi
|
||||
|
||||
# Active MQ configuration directory
|
||||
# Active MQ data directory
|
||||
if [ -z "$ACTIVEMQ_DATA" ] ; then
|
||||
# Preserve old configuration setting functionality.
|
||||
if [ -z "$ACTIVEMQ_DATA_DIR" ] ; then
|
||||
ACTIVEMQ_DATA_DIR="$ACTIVEMQ_BASE/data"
|
||||
ACTIVEMQ_DATA="$ACTIVEMQ_BASE/data"
|
||||
ACTIVEMQ_DATA_DIR="ACTIVEMQ_DATA"
|
||||
else
|
||||
ACTIVEMQ_DATA="$ACTIVEMQ_DATA_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
setCurrentUser(){
|
||||
@ -381,6 +393,8 @@ invokeJar(){
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS >/dev/null 2>&1 &
|
||||
RET=\"\$?\"; APID=\"\$!\";
|
||||
@ -393,6 +407,8 @@ invokeJar(){
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS --pid $PID &
|
||||
RET=\"\$?\"; APID=\"\$!\";
|
||||
@ -403,6 +419,8 @@ invokeJar(){
|
||||
-Dactivemq.classpath=\"${ACTIVEMQ_CLASSPATH}\" \
|
||||
-Dactivemq.home=\"${ACTIVEMQ_HOME}\" \
|
||||
-Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
|
||||
-Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
|
||||
-Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
|
||||
$ACTIVEMQ_CYGWIN \
|
||||
-jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS" $DOIT_POSTFIX
|
||||
RET="$?"
|
||||
|
@ -116,10 +116,22 @@ if [ -z "$ACTIVEMQ_BASE" ] ; then
|
||||
ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
|
||||
fi
|
||||
|
||||
# Active MQ configuration directory
|
||||
if [ -z "$ACTIVEMQ_CONF" ] ; then
|
||||
ACTIVEMQ_CONF="$ACTIVEMQ_BASE/conf"
|
||||
fi
|
||||
|
||||
# Active MQ data directory
|
||||
if [ -z "$ACTIVEMQ_DATA" ] ; then
|
||||
ACTIVEMQ_DATA="$ACTIVEMQ_BASE/data"
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
ACTIVEMQ_HOME=`cygpath --windows "$ACTIVEMQ_HOME"`
|
||||
ACTIVEMQ_BASE=`cygpath --windows "$ACTIVEMQ_BASE"`
|
||||
ACTIVEMQ_CONF=`cygpath --windows "$ACTIVEMQ_CONF"`
|
||||
ACTIVEMQ_DATA=`cygpath --windows "$ACTIVEMQ_DATA"`
|
||||
ACTIVEMQ_CLASSPATH=`cygpath --path --windows "$ACTIVEMQ_CLASSPATH"`
|
||||
JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
@ -127,7 +139,7 @@ if $cygwin; then
|
||||
fi
|
||||
|
||||
# Set default classpath
|
||||
ACTIVEMQ_CLASSPATH="${ACTIVEMQ_BASE}/conf;"$ACTIVEMQ_CLASSPATH
|
||||
ACTIVEMQ_CLASSPATH="${ACTIVEMQ_CONF};"$ACTIVEMQ_CLASSPATH
|
||||
|
||||
if [ ""$1 = "start" ] ; then
|
||||
if [ -z "$ACTIVEMQ_OPTS" ] ; then
|
||||
@ -149,7 +161,7 @@ fi
|
||||
#ACTIVEMQ_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
|
||||
|
||||
if [ -n "$CYGHOME" ]; then
|
||||
exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}" -Dactivemq.data="${ACTIVEMQ_DATA}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
|
||||
else
|
||||
exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
|
||||
exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}" -Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}" -Dactivemq.data="${ACTIVEMQ_DATA}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
|
||||
fi
|
||||
|
@ -71,6 +71,10 @@ echo.
|
||||
|
||||
if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
|
||||
|
||||
if "%ACTIVEMQ_CONF%" == "" set ACTIVEMQ_CONF=%ACTIVEMQ_HOME%\conf
|
||||
|
||||
if "%ACTIVEMQ_DATA%" == "" set ACTIVEMQ_DATA=%ACTIVEMQ_HOME%\data
|
||||
|
||||
if /i not "%1" == "start" goto debugOpts
|
||||
|
||||
|
||||
@ -88,9 +92,8 @@ REM Uncomment to enable remote debugging
|
||||
REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
||||
|
||||
REM Setup ActiveMQ Classpath. Default is the conf directory.
|
||||
set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_CLASSPATH%
|
||||
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %*
|
||||
set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_CONF%;%ACTIVEMQ_DATA%;%ACTIVEMQ_CLASSPATH%
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.data="%ACTIVEMQ_DATA%" -Dactivemq.conf="%ACTIVEMQ_CONF%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %*
|
||||
|
||||
goto end
|
||||
|
||||
|
@ -71,6 +71,10 @@ echo.
|
||||
|
||||
if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
|
||||
|
||||
if "%ACTIVEMQ_CONF%" == "" set ACTIVEMQ_CONF=%ACTIVEMQ_HOME%\conf
|
||||
|
||||
if "%ACTIVEMQ_DATA%" == "" set ACTIVEMQ_DATA=%ACTIVEMQ_HOME%\data
|
||||
|
||||
if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties
|
||||
|
||||
if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
|
||||
@ -84,9 +88,9 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:tra
|
||||
|
||||
REM Setup ActiveMQ Classpath.
|
||||
REM Add instance conf dir before AMQ install conf dir to pick up instance-specific classpath entries first
|
||||
set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_CLASSPATH%
|
||||
set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_CONF%;%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_CLASSPATH%
|
||||
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" start %*
|
||||
"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%" -Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.conf="%ACTIVEMQ_CONF%" -Dactivemq.data="%ACTIVEMQ_DATA%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" start %*
|
||||
|
||||
goto end
|
||||
|
||||
|
@ -25,14 +25,14 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<value>file:${activemq.base}/conf/credentials.properties</value>
|
||||
<value>file:${activemq.conf}/credentials.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
The <broker> element is used to configure the ActiveMQ broker.
|
||||
-->
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
|
||||
|
||||
<!--
|
||||
For better performances use VM cursor and small memory limit.
|
||||
@ -88,7 +88,7 @@
|
||||
http://activemq.apache.org/persistence.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/kahadb"/>
|
||||
<kahaDB directory="${activemq.data}/kahadb"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
|
||||
<property name="name" value="ActiveMQRealm" />
|
||||
<property name="config" value="${activemq.base}/conf/jetty-realm.properties" />
|
||||
<property name="config" value="${activemq.conf}/jetty-realm.properties" />
|
||||
</bean>
|
||||
|
||||
<bean id="securityConstraint" class="org.eclipse.jetty.http.security.Constraint">
|
||||
|
@ -24,7 +24,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<value>file:${activemq.base}/conf/credentials.properties</value>
|
||||
<value>file:${activemq.conf}/credentials.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="command-broker" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="command-broker" dataDirectory="${activemq.data}">
|
||||
<managementContext>
|
||||
<managementContext createConnector="true"/>
|
||||
</managementContext>
|
||||
|
@ -36,7 +36,7 @@
|
||||
-->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<value>file:${activemq.base}/conf/credentials.properties</value>
|
||||
<value>file:${activemq.conf}/credentials.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@ -131,7 +131,7 @@
|
||||
http://activemq.apache.org/persistence.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" />
|
||||
<kahaDB directory="${activemq.data}/dynamic-broker1/kahadb" indexWriteBatchSize="1000" enableIndexWriteAsync="true" enableJournalDiskSyncs="false" />
|
||||
</persistenceAdapter>
|
||||
|
||||
<!--
|
||||
@ -139,7 +139,7 @@
|
||||
persistence.
|
||||
|
||||
<persistenceFactory>
|
||||
<journalPersistenceAdapterFactory dataDirectory="${activemq.base}/data" dataSource="#postgres-ds"/>
|
||||
<journalPersistenceAdapterFactory dataDirectory="${activemq.data}" dataSource="#postgres-ds"/>
|
||||
</persistenceFactory>
|
||||
-->
|
||||
|
||||
@ -159,8 +159,8 @@
|
||||
http://activemq.apache.org/how-do-i-use-ssl.html
|
||||
-->
|
||||
<sslContext>
|
||||
<sslContext keyStore="file:${activemq.base}/conf/broker.ks"
|
||||
keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts"
|
||||
<sslContext keyStore="file:${activemq.conf}/broker.ks"
|
||||
keyStorePassword="password" trustStore="file:${activemq.conf}/broker.ts"
|
||||
trustStorePassword="password"/>
|
||||
</sslContext>
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker1" dataDirectory="${activemq.data}">
|
||||
|
||||
<!-- Destination specific policies using destination names or wildcards -->
|
||||
<destinationPolicy>
|
||||
@ -76,7 +76,7 @@
|
||||
</networkConnectors>
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/dynamic-broker1/kahadb"/>
|
||||
<kahaDB directory="${activemq.data}/dynamic-broker1/kahadb"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<!-- The maximum amount of space the broker will use before slowing down producers -->
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dynamic-broker2" dataDirectory="${activemq.data}">
|
||||
|
||||
<!-- Destination specific policies using destination names or wildcards -->
|
||||
<destinationPolicy>
|
||||
@ -78,7 +78,7 @@
|
||||
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/dynamic-broker2/kahadb" />
|
||||
<kahaDB directory="${activemq.data}/dynamic-broker2/kahadb" />
|
||||
</persistenceAdapter>
|
||||
|
||||
<!-- The maximum amount of space the broker will use before slowing down producers -->
|
||||
|
@ -37,13 +37,13 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<value>file:${activemq.base}/conf/credentials.properties</value>
|
||||
<value>file:${activemq.conf}/credentials.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core">
|
||||
<persistenceAdapter>
|
||||
<jdbcPersistenceAdapter dataDirectory="${activemq.base}/data" dataSource="#derby-ds"/>
|
||||
<jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#derby-ds"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
|
@ -39,7 +39,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" useJmx="false" advisorySupport="false">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
|
||||
|
||||
<!--
|
||||
Turn on optimizedDispatch
|
||||
@ -60,7 +60,7 @@
|
||||
http://activemq.apache.org/kahadb.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/kahadb" enableIndexWriteAsync="true"/>
|
||||
<kahaDB directory="${activemq.data}/kahadb" enableIndexWriteAsync="true"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<!--
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
|
||||
<constructor-arg ref="configurationEncryptor" />
|
||||
<property name="location" value="file:${activemq.base}/conf/credentials-enc.properties"/>
|
||||
<property name="location" value="file:${activemq.conf}/credentials-enc.properties"/>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
|
@ -36,7 +36,7 @@
|
||||
ACTIVEMQ_OPTS_MEMORY="-Xmx11g -Xms6g -Dorg.apache.activemq.UseDedicatedTaskRunner=false -Djava.util.logging.config.file=logging.properties -XX:+UseLargePages"
|
||||
-->
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost"
|
||||
dataDirectory="${activemq.base}/data" deleteAllMessagesOnStartup="true"
|
||||
dataDirectory="${activemq.data}" deleteAllMessagesOnStartup="true"
|
||||
advisorySupport="false"
|
||||
enableStatistics="false"
|
||||
schedulerSupport="false"
|
||||
@ -85,7 +85,7 @@
|
||||
<!-- use small number of data files (seldom switch) -->
|
||||
<!-- keep index off the disk (in cache) -->
|
||||
|
||||
<kahaDB directory="${activemq.base}/data/kahadb"
|
||||
<kahaDB directory="${activemq.data}/kahadb"
|
||||
cleanupInterval="300000" checkpointInterval="50000"
|
||||
journalMaxWriteBatchSize="62k"
|
||||
journalMaxFileLength="1g"
|
||||
|
@ -41,7 +41,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker1" dataDirectory="${activemq.data}">
|
||||
|
||||
<!-- Destination specific policies using destination names or wildcards -->
|
||||
<destinationPolicy>
|
||||
@ -72,7 +72,7 @@
|
||||
</networkConnectors>
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/static-broker1/kahadb" />
|
||||
<kahaDB directory="${activemq.data}/static-broker1/kahadb" />
|
||||
</persistenceAdapter>
|
||||
|
||||
<!-- The maximum amount of space the broker will use before slowing down producers -->
|
||||
|
@ -41,7 +41,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker2" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="static-broker2" dataDirectory="${activemq.data}">
|
||||
|
||||
<!-- Destination specific policies using destination names or wildcards -->
|
||||
<destinationPolicy>
|
||||
@ -72,7 +72,7 @@
|
||||
</networkConnectors>
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/static-broker2/kahadb" />
|
||||
<kahaDB directory="${activemq.data}/static-broker2/kahadb" />
|
||||
</persistenceAdapter>
|
||||
|
||||
<!-- The maximum amount of space the broker will use before slowing down producers -->
|
||||
|
@ -37,14 +37,14 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<value>file:${activemq.base}/conf/credentials.properties</value>
|
||||
<value>file:${activemq.conf}/credentials.properties</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
The <broker> element is used to configure the ActiveMQ broker.
|
||||
-->
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}">
|
||||
|
||||
<!--
|
||||
For better performances use VM cursor and small memory limit.
|
||||
@ -100,7 +100,7 @@
|
||||
http://activemq.apache.org/persistence.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/kahadb"/>
|
||||
<kahaDB directory="${activemq.data}/kahadb"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" useJmx="false" advisorySupport="false">
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="false" advisorySupport="false">
|
||||
|
||||
<!--
|
||||
Use VM cursor
|
||||
@ -65,7 +65,7 @@
|
||||
http://activemq.apache.org/kahadb.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${activemq.base}/data/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
|
||||
<kahaDB directory="${activemq.data}/kahadb" enableJournalDiskSyncs="false" indexWriteBatchSize="10000" indexCacheSize="1000"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<!--
|
||||
|
@ -27,7 +27,7 @@
|
||||
<broker brokerName="broker" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
|
||||
|
||||
<persistenceAdapter>
|
||||
<kahaPersistenceAdapter directory = "${activemq.home}/activemq-data"/>
|
||||
<kahaPersistenceAdapter directory = "${activemq.data}/kaha"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<transportConnectors>
|
||||
|
Loading…
x
Reference in New Issue
Block a user