4 Replies Latest reply on Sep 29, 2003 1:25 PM by raja05

    ear deployment order

    ioparra

      I have a nicely packaged ear with 4 EJB jars files. I'd like the ear to deploy these in a particular order. How do a achieve that?

      For example, i have

      A.jar
      B.jar
      C.jar


      I'd like the EAR to be deployed either in Alphabetical order or first order.

      I know I have the option of deploying in the deploy directory with the correct prefix scanner. I want to deploy in standard EAR. Is there a configuration option somewhere that'll do that for me?

      -Ivan

        • 1. Re: ear deployment order
          ioparra

          The eardeployer is reading the application.xml into a hashset and is iterating over the hashset. That iterator loses the ordering in the hashset.

          I've posted in the Deployment section for changing hashset to arraylist.

          • 2. Re: ear deployment order
            raja05

            Can you try having a depends clause in jboss.xml so that the beans depend on each other,
            For e.g, Bean B can have a depends like
            jboss.j2ee:jndiName=BeanA,service=EJB

            and bean c can have
            jboss.j2ee:jndiName=BeanB,service=EJB

            -Raj

            • 3. Re: ear deployment order
              ioparra

              Thanks Raj. I'm figuring since the EJB become Mbeans, this depends part will work.

              That'll mean I'll have to modify my xdoclet results after the descriptors are generated. Oh well..

              As far as my previous statement, making the metadata use an ArrayList instead of a HashSet won't work. Ultimately, the Ear deployer sets each jar a subdeployer in set list. This set is also a hashset. Ordering is lost there to. :)

              Thanks Raj!


              -Ivan

              • 4. Re: ear deployment order
                raja05

                One thing u can do instead of tweaking the descriptor is maybe use a XDoclet merge file instead of letting XDoclet create the file for the Beans which have dependencies. Too bad Xdoclet cant generate them.
                One way or other, you have to generate the XML :-(