In previous versions you just disable the ScanEnabled attribute in conf/jboss-service.xml.
I am wondering how do you disable this on JBoss 7
Thanks
In previous versions you just disable the ScanEnabled attribute in conf/jboss-service.xml.
I am wondering how do you disable this on JBoss 7
Thanks
You could just remove the deployment scanner subsystem.
Remove <extension module="org.jboss.as.deployment-scanner"/>
and then remove the:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-zipped="false" auto-deploy-exploded="false"/>
</subsystem>
If you don't want to remove the subsystem, add auto-deploy-zipped="false" auto-deploy-exploded="false"
to your <deployment-scanner/>
tag.
I was struggling with this today. While you can set auto-deploy-zip and auto-deploy-exploded both to false, this doesn't actually disable hot deploy, it just makes it so that you have to trigger hot deploy by touching a .dodeploy file to initiate it. Additionally, this requires that you touch a .dodeploy file for each artifact that you want to start after the container is started.
Reading over: https://community.jboss.org/wiki/TurnDeploymentScannerDown and this: https://docs.jboss.org/author/display/AS7/Deployment+Scanner+configuration I realized that the proper way to disable hot deploy is to set the scan-interval to a negative number, this causes the deployment scanner to run on startup only.
Assuming you are running AS 7 in the standalone mode, you'll have to add the deployment-scanner sub-system configuration as shown below
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />
<deployment-scanner name="my-external-deployment-scanner" path="/home/jpai/as7/deployments" scan-interval="5000" />
</subsystem>
https://community.jboss.org/wiki/DeployingAnApplicationFromAnExternalDeploymentLocation
https://docs.jboss.org/author/display/AS7/Application+deployment
Whilst migration applications from JBoss 4 we had the same requirement. We set the scan-interval to 0 so the deployments directory is scanned at server startup only.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner name="your-jboss6-deploymentscanner" path="${your.scan.dir}" scan-interval="0"/>
</subsystem>
In the above your.scan.dir is set on the command line when we start the server.