Contact Free trial Login

Application Hot Deployment

Modify your configuration files and custom classes and reload them without having to restart Mule.

Outline of a Deployment

Here is a quick summary for deploying an app 'foo':

  • Create a directory under $MULE_HOME/apps/foo.

  • Place your packaged application (for example foo.jar) at $MULE_HOME/apps.

  • If there are custom classes, compress to a JAR, and put them under $MULE_HOME/apps/foo/META-INF/mule-src/foo/src/main/java/.

  • Enter mule -M-Dmule.deploy.applications=foo to start your app.

The application’s configuration files are monitored, which means that if there are any class changes you want to add, or changes to the config, you can save or touch any of the Mule configuration files, and Mule will hot reload the application.

How Hot Deployment works

Mule checks every three seconds for updated configuration files under the $MULE_HOME/apps directory, and when it finds one, it reloads the configuration file and the JARs in that applications java source directory. To reload an application, you can:

  • Touch the anchor file of that application.

  • Touch or update any of the Mule configuration files declared in the mule-artifact.json file.

For example, if you want to modify one of your custom classes, make your changes to the custom class, copy the updated class to the java directory, then touch the anchor file.