7

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

shinra tensei
  • 693
  • 5
  • 20
  • 39

4 Answers4

12

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.

James R. Perkins
  • 16,800
  • 44
  • 60
  • 2
    See @detiber's answer for instructions how to disable *hot deployment* without disabling *all deployments* in `deployments/`. – Piotr Findeisen Feb 04 '14 at 08:18
12

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.

detiber
  • 166
  • 1
  • 3
1

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>

References

https://community.jboss.org/wiki/DeployingAnApplicationFromAnExternalDeploymentLocation
https://docs.jboss.org/author/display/AS7/Application+deployment
uaarkoti
  • 3,659
  • 2
  • 20
  • 23
0

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.

ozOli
  • 1,414
  • 1
  • 18
  • 26