Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

Configuring the Wrapper

Overview

The wrapper is configured by the wrapper.conf file, which is located under the InstallDir/bin/win32/ directory.

Specifying the Fuse Message Broker's environment

A broker's environment is controlled by two environment variables:

  • ACTIVEMQ_HOME—the location of the Fuse Message Broker install directory.

  • ACTIVEMQ_BASE—the root directory containing the configuration, logging, and persistence data specific to the broker instance.

    The configuration for the broker instance is stored in the ACTIVEMQ_BASE/conf directory. The logging and persistence data is stored in the ACTIVEMQ_BASE/data directory.

It is likely that you will need to customize the values of the ACTIVEMQ_HOME and ACTIVEMQ_BASE properties in the wrapper.conf file. Example 7 shows the default values.

Example 7. Default Environment Settings

set.default.ACTIVEMQ_HOME=../..
set.default.ACTIVEMQ_BASE=../..

Important

When specifying file and directory paths in wrapper.conf, the forward slash, /, is used.

Passing parameters to the JVM

If you want to pass parameters to the JVM, you do so by setting wrapper properties using the form wrapper.java.additional.<n>. <n> is a sequence number that must be distinct for each parameter.

Setting Java system properties

One of the most useful things you can do by passing additional parameters to the JVM is to set Java system properties. The syntax for setting a Java system property is wrapper.java.additional.<n>=-DPropName=PropValue.

Example 8 shows the default Java properties.

Example 8. Default Java System Properties

# Java Additional Parameters
# note that n is the parameter number starting from 1.
wrapper.java.additional.1=-Dactivemq.home="%ACTIVEMQ_HOME%"
wrapper.java.additional.2=-Dactivemq.base="%ACTIVEMQ_BASE%"
wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
wrapper.java.additional.5=-Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker.ks"
wrapper.java.additional.6=-Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts"
wrapper.java.additional.7=-Dcom.sun.management.jmxremote
wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true
wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties

Setting application parameters

You specify application parameters using the syntax wrapper.app.parameter.<n>. <n> is a sequence number that must follow the pattern:

  • 1—specifies the name of the Java class executed by the wrapper

  • >=2—specify properties passed to the application

Example 9 shows the default settings.

Example 9. Default Wrapper Application Settings

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.activemq.console.Main
wrapper.app.parameter.2=start

Adding classpath entries

You add classpath entries using the syntax wrapper.java.classpath.<n>. <n> is a sequence number that must be distinct for each classpath entry.

Example 10 shows the default classpath entries.

Example 10. Default Wrapper Classpath

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar

Reference

For a complete description of all the properties you can set in the wrapper.conf configuration file, see Configuration Property Overview at the Tanuki Web site.

Comments powered by Disqus