How to configure JBoss to disable hot deployment ?
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:
/subsystem=deployment-scanner/scanner=default:write-attribute(name=auto-deploy-zipped,value=false)
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:
/subsystem=deployment-scanner/scanner=default:write-attribute(name=scan-enabled,value=false)
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)
Recommended Articles
Temporarily Disable Auto-Deployment with WildFly and JBoss EAP
Learn how to temporarily disable auto-deployment in WildFly/JBoss EAP using a .skipdeploy marker file or MBean. #WildFly #JBossEAP #Java #CloudNative
Deploy Applications to WildFly: Custom Deployment Directory Tutorial
Learn how to configure custom deployment directories for WildFly applications. #WildFly #JavaDeployment #CloudNative
Configure JBoss EAP/WildFly Deployment Order with Ease
Learn how to configure precise deployment order in EAR files and between multiple deployments using JBoss EAP/WildFly.
Solving EAR Deployment Dependencies in WildFly and JBoss AS 7
Learn how to manage deployment dependencies in WildFly and JBoss AS 7 using jboss-all.xml files and CLI batches. Get a step-by-step guide on resolving EAR file dependencies.