You are viewing an older version of this section. Click here to navigate to the latest version.

Controlling Mule From Startup

This topic describes how to control Mule ESB 3 using the Java Service Wrapper, as well as passing arguments to the JVM to control Mule.

Understanding the Java Service Wrapper

When you run the mule command, it launches the mule.bat or script in your MULE_HOME/bin directory. These scripts invoke the Java Service Wrapper (, which controls the JVM from your operating system and starts Mule. The Wrapper can handle system signals and provides better interaction between the JVM and the underlying operating system. It also provides many advanced options and features that you can read about on the Wrapper website.

The Java Service Wrapper allows you to run Mule as a UNIX daemon, and it can install (or remove) Mule as a Windows NT Service.

Passing Additional Arguments to the JVM to Control Mule

The Wrapper provides several properties you can set as described here. If you want to pass additional arguments to the JVM that will run Mule, you can add entries to the wrapper.conf file in the /conf directory under the Mule installation directory, or you can pass the arguments at the command line by adding the -M switch.

For example, to set Mule’s encoding, you could add to the Wrapper configuration file, or you could add -M-Dmule.encoding=ISO-8859-1 to the Mule script at the command line. Note that if you add entries to the configuration file, you must change each instance of n to a consecutive number, or Java will not parse the properties correctly.

Passing Additional Arguments to the Wrapper

To control the behavior of the Wrapper from the commandline use the -W switch when launching Mule.

For example, to set the logfile that the Wrapper’s uses, you could add wrapper.logfile=/my/log/file.log to the Wrapper configuration file, or you could add -Wwrapper.logfile=/my/log/file.log to the Mule script at the command line.