5 Replies Latest reply on Nov 26, 2008 4:19 PM by Benoit Xhenseval

    .ear priority deployment

    Matt Fury Newbie

      Google is failing me so I am coming straight to the source. We have an app that we are deploying that depends on other apps to be loaded first but I noticed JBoss is loading them in alphabetical order. Is there a way to prioritize the loading of the .ear applications. I know that you can set the priority in Weblogic. I can't find a way to do it in JBoss. I found you can set the priority of application types like .war, .ear, etc. but not within the extension themselves.

      Sorry if it's right in front of my face!



        • 1. Re: .ear priority deployment
          V B Newbie

          I have 2 solutions for you :
          - you can easily extend the JBoss DeploymentSorter. Then declare the new class in jboss-service.xml in URLComparator.
          - you can define dependencies between jmx names. You can say for example that the war needs an ejb or an ear or a sar. There is only one limitation : you can't define a dependency deployement for an ear. But you can set a jmx-name so that others can depends on this ear.
          Example : in you war's jboss-web.xml, you can set
          In this case, you war won't deploy until OwnService is deployed.


          • 2. Re: .ear priority deployment
            zhengxi qu Newbie

            hi vberetti
            I need to solve this problem also.
            and i want to use your second solutions.

            I add this to jboss-web.xml, but it doesn't work. could you please describe it in details. thanks a lot.

            • 3. Re: .ear priority deployment
              V B Newbie

              In your ear, in META_INF/jboss-app.xml :


              In your war, in META-INF/jboss-web.xml:

              this way, your war will deploy after your ear is deployed. But keep in mind that the ear depends on the war is not possible. The deployment of the ear can not depend on other services (but services in the ear can).
              Hope it will help you.

              • 4. Re: .ear priority deployment
                zhengxi qu Newbie

                thank you very very much:)
                it works fine.

                could i get your IM account or email?
                my email: quzgxi@gmail.com

                if you don't like that, just skip my request :)

                thanks again.

                • 5. Re: .ear priority deployment
                  Benoit Xhenseval Newbie

                  Hi All,

                  I have a similar problem, I'm trying to get a Quartz MBean setup and get it to deploy AFTER my ear application (the Jobs classes are included in my ear file).

                  How could I do this?

                  Using this dependency does not work


                  As it seems to be completed before the app is actually deployed.

                  I even tried 3 dependencies:

                  But same problem, it looks like Quartz is launched before the ear is fully deployed...

                  Any pointer/solution would be greatly appreciated.