4 Replies Latest reply on Oct 8, 2015 8:33 AM by weberj

    Deployment plans

    weberj

      You can change application properties during deployment using JBoss property substition like

       

      <activation-config-property-value>${mdb.queue}</activation-config-property-value>

       

      But this works only once, i.e. you cannot have in the same server an instance of an MDB with -Dmdb.queue=Q_A and another instance with -Dmdb.queue=Q_B

       

      Geronimo and Weblogic solve this problem using deployment plans.

       

      You deploy an mdb.jar together with an openejb-jar.xml that allows to override properties in JEE descriptors in repeating XML structures, so you can deploy the same ejb several times with different parameters.

       

      As far as I know there is no such feature for Wildfly.

       

      Are there any plans to implement such a feature in the future?

       

      http://geronimo.apache.org/GMOxDOC30/understanding-deployment-plans.html

       

      Thanks,

      Juergen

        • 1. Re: Deployment plans
          jaysensharma

          Hello Juergen,

           

             Are you looking out for something like "Deployment Overlay" Feature of WildFly ?

           

              This feature allows you to 'overlayi content into an existing deployment, without physically modifying the contents of the deployment archive. Possible use cases include swapping out deployment descriptors, modifying static web resources to change the branding of an application, or even replacing jar libraries with different versions.

           

             https://docs.jboss.org/author/display/WFLY8/Deployment+Overlays

          • 2. Re: Deployment plans
            ctomc

            @

            Juergen Weber wrote:

             

            You can change application properties during deployment using JBoss property substition like

             

            <activation-config-property-value>${mdb.queue}</activation-config-property-value>

             

            But this works only once, i.e. you cannot have in the same server an instance of an MDB with -Dmdb.queue=Q_A and another instance with -Dmdb.queue=Q_B

             

            Geronimo and Weblogic solve this problem using deployment plans.

             

            You deploy an mdb.jar together with an openejb-jar.xml that allows to override properties in JEE descriptors in repeating XML structures, so you can deploy the same ejb several times with different parameters.

             

            As far as I know there is no such feature for Wildfly.

            Yes there is such feature in WildFly, instead of using openejb-jar.xml you have jboss-ejb3.xml that pretty much allows you to do this.

            Property substitution is also available for ejb-jar.xml and annotations you have in application, but that is not enabled by default.

            See EE subsystem for enabling it

            • 3. Re: Deployment plans
              weberj

              Hello Jay,

               

              thanks, that is a cool feature, I didn't know. Unfortunately it only works with CLI not in the deploy directory.

              I'd prefer being able to copy a plan into deploy like

              mdb-Q_A-plan.xml:

              <plan>

              <application="mdb.jar" />

              <overlay="overlay/mdb-Q_A-ejb.jar.xml" target="META-INF/ejb-jar.xml" />

              </plan>

               

              Thanks,

              Juergen

              • 4. Re: Deployment plans
                weberj

                jboss-ejb3.xml has to be in the ejb.jar, hasn't it? So I can as well have several ejb.jars