5 Replies Latest reply on Jan 29, 2004 5:14 AM by Darran Lofthouse

    deployment order

    Sven Do Newbie


      "sdoer" wrote:
      Is it possible to define the ejb's deployment order for the jboss start/boot process manually? For example - start up deployment order:
      1. EJB2
      2. EJB1
      3. ....

        • 1. Re: deployment order
          Jon Barnett Master


          "jonlee" wrote:
          Using the DeploymentSorter will allow you to govern the deployment order. Check the conf/jboss-service.xml for more information.

          One way is to bundle your EJB components into SARs, as the default deployment sorting will deal with SARs, then RARs, etc.

          You can also switch to the prefix deployment sorter which works on numerical values at the start of the file URL. 1Bean.jar would be deployed by 2Bean.jar and so on.

          These work for the 3.0.x and 3.2.x distributions. Note that this isn't particularly portable. The manuals cover this topic in detail.

          • 2. Re: deployment order
            Sven Do Newbie


            "sdoer" wrote:
            I use the PrefixDeploymentSorter now - it works.
            Thank you!

            • 3. Re: deployment order
              dlastoria Newbie


              "dlastoria" wrote:
              This too worked for me, but I would like a more elegant solution. The problem I have is that I have two .EAR files that must be deployed in a particular order as the second .EAR requires some components that are deployed with the first .EAR file.

              I fixed this by modifying .../conf/jboss-service.xml as mentioned above, like this (commenting the default and uncommenting the other):

               <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
               <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>

              Then I name the one file 01_example_stuff.EAR
              And the other file 02_example_stuff.EAR

              This works of course, but I would like to know if there is a better solution?

              • 4. Re: deployment order
                dlastoria Newbie


                "dlastoria" wrote:
                As usual, wonderful response from these forums!

                I can't wait till we migrate to Websphere so I can actually get some support. What a worthless product.

                • 5. Re: deployment order
                  Darran Lofthouse Master


                  "darranl" wrote:
                  dlastoria - You have already said that you have been able to get it to work (Which is the same as everyone else can do)- you are only looking for a better solution (Which maybe you should write and contribute to JBoss).

                  I am not sure about multiple ears but the deployment order within an ear can generally be controlled with depends elements.

                  I can't wait till we migrate to Websphere so I can actually get some support. - Who said that you were entitled to free JBoss support, how much have you paid for a support contract?

                  What a worthless product. - Just because you are incapable of working out how to use it does not make it a worthless product.