6 Replies Latest reply on Nov 6, 2003 4:19 AM by frito

    Deployment Strategy of JAR files by JBOSS server

    shardul

      Does anyone Know what strategy does jboss 3.0 server use for the deployment of JAR files?
      Like whether it deploys the files in an alphabetical order or whether it deploys the JAR files according to the timestamp related with the files?
      Is there any difference in deploying this file with respect to the operating system?

        • 1. Re: Deployment Strategy of JAR files by JBOSS server
          shardul

          Please note that this problem is only when we are deploying the JAR files on a Linux server.
          On a windows machine it takes the JAR files alphabetically

          • 2. Re: Deployment Strategy of JAR files by JBOSS server
            frito

            JBoss is deploying in this order (see the conf/jboss-service.xml):
            "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip", "*".
            The order within one type of deployment is random.

            You can configure the jboss-service.xml mentioned above to use the PrefixDeploymentSorter. This will do the trick.

            Greetings,
            Frito

            • 3. Re: Deployment Strategy of JAR files by JBOSS server
              shardul

              Thanks Frito,
              For u r help.
              We tried what u had suggested but it is not working that way. Actually we face no problems when deploying the jar's on a windows machine.
              But when we deploy the jar's on a Linux server it does not deploy the jar's in any particular format and we r not getting the format in which it deploys the jar files. Actually we tried all the methods you had mentioned but it did not work in that manner.If you get any other information please do mail it to us.
              Thank you once again for your help Frito

              • 4. Re: Deployment Strategy of JAR files by JBOSS server
                frito

                The PrefixDeploymentSorter works fine. Be sure you are using it and the name of the deployment units you want to be affected start with something numeric.

                Greetings,
                Frito

                • 5. Re: Deployment Strategy of JAR files by JBOSS server

                  The PrefixDeploymentSorter may work for some scenarios but it doesn't work for this one:

                  I have an ear directory in the server/default/deploy directory and I am trying to deploy an ejb jar directory and a war directory within that top-level ear directory (I have my application in directories, not archive files, for development purposes). I would like to deploy the war directory before the ejb directory, but the PrefixDeploymentSorter doesn't seem to recognize the numerical sorting scheme for these. Perhaps PrefixDeploymentSorter only works in the deploy directory and not within an ear directory?

                  • 6. Re: Deployment Strategy of JAR files by JBOSS server
                    frito

                    Check out the JBoss DTDs. You can add dependencies to every component (e.g. EJBs).
                    If this is still not enough, write your own deployment sorter e.g. by extending the existing one. Watch the sources, this part is pretty easy.

                    Greetings,
                    Frito