There are only a few ways by which you can let JBoss sort out the dependencies.
1. Default Deployment Sorter.
Sorts by file extension, as follows:
"sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
2. PrefixDeployment Sorter: Sorts the entries in the deploy directory and goes alphabetically.
3. I believe that with the default option, you can put archives into a deploy.last folder and that will be the last one to deploy.
But there is no way to specify an order that I want?
I am interested in this also. I'm having IlegalAccess errors using 3.2.5 because of the order JBoss deploys my EARs.
I found a workaround: it seems like the default deployment scheme uses alphabetical sorting. Using this info, I renamed my ears 1-ear1.ear 2-ear2.ear 3-ear3.ear (if you have more than 10 ears, I guess you would use 01-, 02-, 03-, etc.)
Other than the above, is there a better way?
It must be a better way... this is a very common issue. I'm still wondering a solution for this
PLEASE SOMEBODY HELP US!!!! (specially for the GURUS)
I didn't find the PrefixDeploymentSorter...
look in server/default/conf/jboss-service.xml and search for Sorter. There is a section that explains how it work.s Just uncomment the PrefixDeploymentSorter entry and you should be OK.
From http://wiki.jboss.org/wiki/Wiki.jsp?page=URLComparator, the ordering of suffixes is: "deployment (since 4.0)", "-deployment.xml (since 4.0)", "sar", "-service.xml", "rar", "-ds.xml", "har", "jar", "war", "wsr", "ear", "zip", "bsh", last, *
From http://wiki.jboss.org/wiki/Wiki.jsp?page=DeploymentScanner, the ordering of suffixes is: "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip".
In my application, I try to deploy a SAR file with "ear" and "-ds.xml" but it complaints that it cannot found the datasource. In the first case, it should work as ds are deployed before ear but not in the second case where ds seemes to be deployed at the end.
What' s the right way?