1 Reply Latest reply on Nov 8, 2006 8:32 AM by jaikiran pai

    Is there a order in which jboss loads it's deployed applicat

    cees vw Newbie

      and if so can this order be influenced?

      Cause we have an ear application and some war applications. The ear application needs to be loaded first because the wars depend on it. An some how jboss always loads the war applications first.
      We can of course deploy the ear on a different jboss instance but for development it is handy to have one jboss server running.

        • 1. Re: Is there a order in which jboss loads it's deployed appl
          jaikiran pai Master

           

          Is there a order in which jboss loads it's deployed applications


          Yes.

          and if so can this order be influenced?


          Yes again. There's a jboss-service.xml file in %JBOSS_HOME%/server/default/conf (replace "default", in this path, with whatever server configuration you are using) which specifies a URLComparator which is used by the DeploymentScanner for ordering the deployments.

          Extract from that file:

          The URLComparator can be used to specify a deployment ordering
          for deployments found in a scanned directory. The class specified
          must be an implementation of java.util.Comparator, it must be able
          to compare two URL objects, and it must have a no-arg constructor.
          Two deployment comparators are shipped with JBoss:
          - org.jboss.deployment.DeploymentSorter
          Sorts by file extension, as follows:
          "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
          "*"
          - org.jboss.deployment.scanner.PrefixDeploymentSorter
          If the name portion of the url begins with 1 or more digits, those
          digits are converted to an int (ignoring leading zeroes), and
          files are deployed in that order. Files that do not start with
          any digits will be deployed first, and they will be sorted by
          extension as above with DeploymentSorter.


          By default it is set to org.jboss.deployment.DeploymentSorter. You can provide your own implementation if these 2 classes shipped by JBoss do not meet your requirements