3 Replies Latest reply on Jun 8, 2010 5:09 PM by ranjix

    any way of specifying the order of deployments in profile.xml?

    ranjix Newbie

      Hey guys, hope someone might have an answer to this question.

       

      Basically I do have several EAR folders (folders with structure similar to an EAR file) which I want started in a specific order. I used the profile.xml file to add the specific folders as in

       

            <property name="applicationURIs">

               <list elementClass="java.net.URI">
                  <value>${jboss.server.home.url}deploy</value>
                 <value>file:///C:/10.DEV.NEW.3/modules/eac/appserver/jboss</value>
                 <value>file:///C:/10.DEV.NEW.3/modules/edesk/appserver/jboss</value>
                 <value>file:///C:/10.DEV.NEW.3/modules/jms/appserver/jboss</value>
                 <value>file:///C:/10.DEV.NEW.3/modules/publish/appserver/jboss</value>
              ...

       

       

      The issue I have is that the deployments seem to start in a "not sure which" order, since I see in the output of the server:

       

       

      15:37:04,116 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console

      15:37:04,257 INFO  [TomcatDeployment] deploy, ctxPath=/eac

      ...

      15:37:10,648 INFO  [TomcatDeployment] deploy, ctxPath=/jms

      ...

      15:37:15,025 INFO  [TomcatDeployment] deploy, ctxPath=/publish

      ...

      15:37:22,953 INFO  [TomcatDeployment] deploy, ctxPath=/edesk

       

       

      Any idea how to set a specific order?

       

       

      thanks for any answer,

      /ranjix

        • 1. Re: any way of specifying the order of deployments in profile.xml?
          jaikiran pai Master

          You'll have to explicitly mark dependencies (using JBoss specific descriptor files) between those .ear files. I need to take a look at which file the dependencies need to be specified in for AS-5 (and what the dependency looks like). In the meantime do a forum search in the  JBoss AS user forum http://community.jboss.org/community/jbossas and see if you can find something useful. I remember there were some discussions around this.

          • 3. Re: any way of specifying the order of deployments in profile.xml?
            ranjix Newbie

            thanks Jaikiran, from the link you sent and some more digging, it seems that there are 2 options

             

            1. have the names of the ear files prefixed by some numbering. In my case, prefixing the names as 1eac.ear, 2jms.ear, 3edesk.ear, 4publish.ear resulted in the correct start order. The only issue was that naming the ear files correctly was kind of a hacky way of fixing this.

            2. create some dependencies between modules. It seems that the war modules support a jboss-web.xml configuration fille, which could contain <depends> tags. In my case, since jms depends on eac, and edesk and publish depend on both jms and eac, I included the following:

             

            - for the jms.ear/jms.war/WEB-INF/jboss-web.xml

             

            <?xml version="1.0" encoding="utf-8"?>
            <jboss-web>
              <!-- Make the webapp dependent of the deployment of the eac -->
              <depends>jboss.web.deployment:war=/eac</depends>
            </jboss-web>

             

            - for edesk and publish

             

            <?xml version="1.0" encoding="utf-8"?>

            <jboss-web>

              <!-- Make the webapp dependent of the deployment of the eac and jms -->

              <depends>jboss.web.deployment:war=/eac</depends>

              <depends>jboss.web.deployment:war=/jms</depends>

            </jboss-web>

             

            up to now, it seems that is ok, the start order is correct. Hope I'm not screwing anything else up...

             

            thanks again,

            ranjix