Application Hot Deployment

You can now modify your configuration files and custom classes and have them reloaded 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

  • Jar custom classes (if any), and put them under $MULE_HOME/apps/foo/lib

  • Place the master Mule config file at $MULE_HOME/apps/foo/mule-config.xml

  • Start your app with mule -app foo

As a bonus, application’s master config file is monitored, so if there are any class changes you want to pick up or simply modify the config, save or touch mule-config.xml 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 lib directory.

Therefore, if you want to change one of your custom classes, you modify and rejar it, copy the updated JAR to the lib directory, and then touch or save the configuration file. Currently, Mule checks only the first configuration file in your application’s directory, so right now hot deployment works best with applications that have a single configuration file.

Additional Features

  • Applications can depend on different library versions, even if they would conflict before

  • Applications are now deployed with clear boundaries

  • Multiple applications can be run side-by-side within a single instance of Mule

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!