2 Replies Latest reply on Apr 18, 2013 6:37 PM by ctomc

    Disabling application deployment in JBoss AS 7

    arulprashanth

      I have a deployment architecture spanning in two different environments say X and Y. X has a standalone JBoss AS 7 and Y has a separate standalone JBoss AS 7. We have application abc.war and xyz.war and as part of the build process we copy both war file to a deployment directory from where the hot deployment happens.

       

      My questions is is there a way where I can define to deploy abc.war and xyz.war in server X and abc.war in server Y or can we disable a specific deployment.

       

      My experience with OC4J and Oracle Weblogic servers allows us to specify a disable flag that would not let the application deploy.

       

      Thanks,

      Arul Prashanth.

        • 1. Re: Disabling application deployment in JBoss AS 7
          brian.stansberry

          Not via the deployment scanner, no.

           

          You can upload a deployment to the server via the CLI but not have it deployed though:

           

          [standalone@localhost:9999 /] deploy ~/tmp/helloworld.war --disabled

          [standalone@localhost:9999 /] cd deployment=helloworld.war

          [standalone@localhost:9999 deployment=helloworld.war] ls -l

          ATTRIBUTE    VALUE                                                                                                                                          TYPE   

          content      [{"hash" => bytes { 0x6f, 0xcd, 0x9e, 0xae, 0x34, 0x3e, 0xd6, 0xd5, 0xaa, 0x9f, 0xff, 0xa8, 0x30, 0x12, 0xd1, 0x55, 0xb1, 0xef, 0x91, 0x1c }}] LIST   

          enabled      false                                                                                                                                          BOOLEAN

          name         helloworld.war                                                                                                                                 STRING 

          persistent   true                                                                                                                                           BOOLEAN

          runtime-name helloworld.war                                                                                                                                 STRING 

          status       STOPPED                                                                                                                                        STRING 

           

           

          CHILD         MIN-OCCURS MAX-OCCURS

          subdeployment n/a        n/a       

          subsystem     n/a        n/a      

           

          Note the "enabled" attribute.

           

          Later you could use the CLI to trigger the deployment:

           

          [standalone@localhost:9999 deployment=helloworld.war] deploy --name=helloworld.war

          [standalone@localhost:9999 deployment=helloworld.war] ls -l

          ATTRIBUTE    VALUE                                                                                                                                          TYPE   

          content      [{"hash" => bytes { 0x6f, 0xcd, 0x9e, 0xae, 0x34, 0x3e, 0xd6, 0xd5, 0xaa, 0x9f, 0xff, 0xa8, 0x30, 0x12, 0xd1, 0x55, 0xb1, 0xef, 0x91, 0x1c }}] LIST   

          enabled      true                                                                                                                                           BOOLEAN

          name         helloworld.war                                                                                                                                 STRING 

          persistent   true                                                                                                                                           BOOLEAN

          runtime-name helloworld.war                                                                                                                                 STRING 

          status       OK                                                                                                                                             STRING 

           

           

          CHILD         MIN-OCCURS MAX-OCCURS

          subdeployment n/a        n/a       

          subsystem     n/a        n/a      

          • 2. Re: Disabling application deployment in JBoss AS 7
            ctomc

            Or you could also use admin console if you dont like CLI