JBoss AS 7 disables hot deployment

In previous versions, you simply disabled the ScanEnabled attribute in conf / jboss-service.xml.

I am wondering how do you disable this on JBoss 7

thanks

+6
source share
4 answers

You can simply remove the deployment scanner subsystem.

Remove <extension module="org.jboss.as.deployment-scanner"/> , and then delete:

  <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 do not want to remove the subsystem, add auto-deploy-zipped="false" auto-deploy-exploded="false" in the <deployment-scanner/> .

+11
source

I struggled with this today. Although you can set auto-deploy-zip and auto-deploy-exploded as false, this does not actually disable hot deployment, it just does so that you have to start hot deployment by touching the .dodeploy file to initiate it. In addition, this requires that you touch the .dodeploy file for each artifact that you want to run after the container starts.

Read: https://community.jboss.org/wiki/TurnDeploymentScannerDown and this: https://docs.jboss.org/author/display/AS7/Deployment+Scanner+configuration I figured out that the proper way to disable hot deployment is to install scan interval to a negative number, this leads to the fact that the deployment scanner runs only start.

+9
source

Assuming that you are using AS 7 offline, you will have to add the deployment-scanner subsystem 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 
+1
source

While migration applications from JBoss 4 had the same requirement. We set the scan interval to 0, so the deployment directory is only checked at server startup.

 <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 file, your.scan.dir is installed on the command line when the server starts.

0
source

Source: https://habr.com/ru/post/913547/


All Articles