7 Replies Latest reply on Mar 10, 2006 4:29 AM by pualsa

    War deployment order in EAR

    shabata

      Hello !

      I'm going through a migration from Websphere to JBoss.

      My EAR contains multiple wars : one is called startup.war and need to be deployed first, another is called endstartup.war and need to be called last.

      How can I configure this ?

      I tried first to use my own URLComparator (DeploymentSorter) but it seems that this sorter is not used for sorting the wars inside my ear.

      Then I saw that the deployment order is managed by the MainDeployer class using a private instance of DeploymentInfoComparator (http://www.cenqua.com/clover/eg/jboss/report/org/jboss/deployment/MainDeployer.html). There's no way to overload it.

      I'm lost, thank you for your help

        • 1. Re: War deployment order in EAR
          dimitris

          Doesn't the order you declare the s in the .ear descriptor make any difference?

          • 2. Re: War deployment order in EAR
            shabata

            Thanx for replying.

            "the s in the .ear" ?

            I'm sorry I don't understand your question...

            • 3. Re: War deployment order in EAR
              dimitris

              The angle brackets where eaten up. I meant the "module" definitions in the .ear deployment descriptos, they were supposed to define the deployment order, or is this broken?

              • 4. Re: War deployment order in EAR
                shabata

                In my application.xml I declare the wars in the same order as deployment order, but I guess it doesn't care this order.

                PS : I use jboss-3.2.8

                • 5. Re: War deployment order in EAR

                  I move my packaging from "eso-ear" to "eso-ear.ear" deploy and run JBoss. Now the ERROR does not occur but I am back to the same problem before when I switched it the opposite way. The eso-ear.ear/META-INF/XXX-ds.xml file does not get picked up so my Datasources do not get deployed. Any ideas why this would occur>

                  • 6. Re: War deployment order in EAR
                    pualsa

                    try to pack into the EAR the META-INF\jboss-app.xml like this:

                    <jboss-app>
                     <module><service>xxx-ds.xml</service></module>
                    </jboss-app>


                    in this case the file xxx-ds.xml should be packed on the top level of the EAR: eso-ear.ear\xxx-ds.xml


                    • 7. Re: War deployment order in EAR
                      pualsa

                      What I found about the deployment order:
                      1) At first are deployed sub-deployments then the top deployment of an archive.
                      2) The sub-deployment are sorted by their suffixes. The default order is:
                      ".deployer", "-deployer.xml", ".sar", "-service.xml", ".rar", "-ds.xml", ".har", ".jar", ".war", ".wsr", ".ear", ".zip", ".bsh", ".last"

                      The EARDeployer scans the META-INF/application.xml and META-INF/jboss-app.xml and creates a DeploymentInfo (DI) for each module. The DI of the EAR is the parent for these DIs. The deployment order of these modules is controlled by their suffixes, nothing else is important.