4 Replies Latest reply on Mar 14, 2007 3:16 PM by jaikiran

    Deployment ordering

    diippi

      I am using spring deployer to deploy my spring beans , archived as abc.spring and specified in application.xml as follows :
      < module>
      < ejb>spring/abc.spring
      </ module>

      The spring beans do a jndi lookup for hibernate session factory deployed as a har file which is specified in jboss-app.xml as follows :
      < module>
      < har>har/xyz.har
      </ module>

      Problem is that spring deployment happens before the har deployment (application.xml before jboss-app.xml) and so it fails .
      Is there any way I can force the har deployment before the spring ?

        • 1. Re: Deployment ordering
          jaikiran

          Change the order in the application.xml itself.

          <!-- First the har and then the ejb -->
          < module>
           < har>har/xyz.har</har>
           </ module>
          
          < module>
           < ejb>spring/abc.spring</ejb>
           </ module>


          • 2. Re: Deployment ordering
            diippi

            < module>
            < har>har/xyz.har
            </ module>

            is not acceptable in application.xml. If you specify it as java module then the required jndi bounding does not happens .

            • 3. Re: Deployment ordering
              dimitris
              • 4. Re: Deployment ordering
                jaikiran

                Dimitris ,

                I am bit confused after reading the Forum Reference (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78376&postdays=0&postorder=asc&start=20) mentioned in that JIRA.

                In one of the posts in that forum reference, you mention that

                Maybe a simpler/better solution is to add in jboss-app.xml a new tag:

                <module-order>implicit|strict</module-order>

                with 'implicit' being the legacy behaviour, and 'strict' work by simply putting the the application.xml & jboss-app.xml modules in that order.

                If modules from the 2 descriptors need to be arbitrarily mixed (e.g. a -ds.xml before an ejb jar), they can always be moved to jboss-app.xml (we already support this).

                The only restriction is a module must appear only once in the 2 descriptors.

                This is essentially the same with adding a new list (like unified-order) but we reuse the existing one, and add the extra flag to specify what we want.

                On the other hand, I would argue that 'strict' should be the default, which is the "correct" behaviour, especially in the absence of a jboss-app.xml descriptor. If an old deployment gets broken, they can simply add the 'implicit' flag.


                1) Has this been implemented, in the jboss-app dtd at http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd i could not find a mention about this.

                2) Considering the following entries in application.xml and jboss-app.xml:

                application.xml:

                <module>
                 <ejb>myEjb.jar</ejb>
                </module>


                jboss-app.xml:

                <module>
                 <har>myHar.har</har>
                <module>


                Which module will be loaded first when:
                a) module-order is 'strict'
                b) module-order is 'implicit'

                Thanks.
                -Jaikiran