Pages

Saturday, November 19, 2016

How to avoid Auto-deploy of content in WildFly 8.2

Basically in WildFly  there are two deployment modes:
  1. Auto deploy mode
  2. Manual deploy mode
  • There is one scanner in WildFly who monitors the deployment content and according to the timestamp automatically deploys it.
  • There are two types of deployment content
               1. Zipped deployment content
               2. Exploded deployment content
  •  In exploded format, a change in single file redeploys the whole content.
  • There is marker file in the directory who indicates the status- deploy or undeploy to the scanner. 
  • By default auto deploy of zipped content is true and exploded content is false.
  • Actual auto deploy configuration is done in standalone.xml which is placed at following path-
    <WildFly-directory>\standalone\configuration\


  • Open standalone.xml file where you will see following entry:

  • Now add auto-deploy attribute to deployment-scanner element as below:



    So here you can see attribute to avoid auto deploy of zip by adding new attribute that is
    auto-deploy-zipped="false"
     
  • What is Marker file?
    Every deployment content have one marker file with the same name having some additional suffix to it.

    Example: Suppose you have HelloWorld.war file then its relative marker file will be HelloWorld.war.dodeploy.




    If you open that file with notepad plus then you will see only name of war file written into it, In our case it is HelloWorld.war