This article will teach you how to enable or disable hot deployment of your applications on WildFly application server. The same concepts apply to JBoss EAP.
Hot deployment defaults in WildFly
By default, if you deploy a JAR/WAR/EAR archive on WildFly, it will be automatically available as deployment unit. On the other hand, exploded archives require a manual step to be available. You can change this behavior in the following ways:
1) To disable automatic deployment of zipped applications execute the following CLI command:
After that, it will require to include a .dodeploy marker file to trigger deployment.
2) Disable the deployment scanner by executing the following CLI command:
The above command, will completely disable the deployment scanner service. This is a recommended best practice for production systems. You should always use management instruments (CLI, Web Console) to deploy your applications in production.
Older JBoss versions
On JBoss AS 4/5/6 you can disable JBoss hot deployment’s feature through the the conf/jboss-service.xml file. Find the following line:
<!-- A flag to disable the scans --> <attribute name="ScanEnabled">true</attribute>
Simply change to false and hot deployment will be disabled.
If on the other hand you simply want to reduce scan polling time, look for a few lines before:
<!-- Frequency in milliseconds to rescan the URLs for changes --> <attribute name="ScanPeriod">5000</attribute>
This will set the scan time (in milliseconds)