2 Replies Latest reply on Nov 18, 2015 10:55 AM by Tomaz Cerar

    Pre-deployment validation in EAP 6.2.4

    Puneet Nayyar Newbie


      I am bit new to JBOSS and have a requirement where I need to do some validations on the WAR archives being hot-deployed in JBOSS. Validations are related to content (some xmls files) present inside the WAR. In case any validation fails then JBOSS should not proceed with the deployment. Is this possible? Can this be controlled through some configuration where I can run my piece of validation code before asking JBOSS to continue with the deployment?


      Please help me formulating a solution here. Thanks in advance!

        • 1. Re: Pre-deployment validation in EAP 6.2.4
          Jay SenSharma Master

          No, unfortunately out of the box i do not see any such option which can be used to validate the Application specific deployment descriptors or application specific config files before the application deployment begins. This is because until unless the application components are initialized some descriptors can not be validated.



          However JBoss provides "--admin-only" flag which can be used to validate the JBoss Speficic configuration. It set the server's running type to ADMIN_ONLY causing it to open administrative interfaces and accept management requests but not start other runtime services or accept end user requests.    (however it can not fulfill your requirement)




          $ ./standalone.sh --admin-only
          • 2. Re: Pre-deployment validation in EAP 6.2.4
            Tomaz Cerar Master

            You would need to write your own subsystem which can access every part of your application as part of deployment chain.


            you can see example guide how to write your own extensions (subsystems) here

            Extending WildFly 8 - WildFly 8 - Project Documentation Editor


            you would need to register your own DeploymentUnitProcessor which can than do whatever you want.