Reputation: 33
How to restart a particular app deployed in mule runtime using a command. For example, I have an app called mymuleapp under Mule_Runtime/apps. Since I have other apps running in the same runtime, I just want to restart mymuleapp alone.
I am not using cloudhub. The reason I am asking is, I have put the properties file outside of the app, So whenever there is any change in the properties I just update it and restart the app.
Please let me know is there a way to do so?
Upvotes: 2
Views: 3941
Reputation: 4129
You can use the touch
command to redeploy the app
touch Mule_Runtime/apps/mymuleapp/mule-config.xml
This works because of hot deployment
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.
Hot deployment also makes it possible to deploy a new version of the application by simply copying the zip
into the the apps directory. Mule will then undeploy the currently deployed application and deploy the new one.
You can also undeploy the application by deleting the mymuleapp-anchor.txt
file.
Upvotes: 6
Reputation: 367
You can do in different ways.
1) If you are using Mule Enterprise Edition,Use MMC to control your apps. Check details here
2) Other option,Go to Mule_Home/apps, open any config xml file in the app which you want to restart and enter any space between the tags and save. This will force the app to re-start automatically. You need to be very careful in doing this.
Upvotes: 1