The jboss-service.xml file in server/default/conf mentions the following:
<!-- 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. --> <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
is it possible to change the order? if so where to change ?
As per the comment in the jboss-service.xml file, you might have to write your own URLComparator, which implements the java.util.Comparator interface. The you can modify the following attribute as follows:
See also http://wiki.jboss.org/wiki/Wiki.jsp?page=MainDeployerEnhancedSuffixOrder
Since 4.0.1 it can be controlled through conf/xmdesc/org.jboss.deployment.MainDeployer-xmbean