Sure. You can do a couple of things.
If you're looking to alter the order of deployment:
1) Write your own DeploymentSorter and plug it into the MainDeployer in $JBOSS_HOME/server/[youServerName]/conf/jboss-service.xml - you can customize here to your heart's content.
- OR -
2) Add a numeric or alphanumeric prefix (eg "1-myapp.ear") to each of your deployable units, and set the "URLComparator" attribute of the deployment sorter appropriately.
...but better for you in this case, if your JARs are more than libraries and contain deployable units in themselves (EJB3s, or example), you'd be better off defining in a @Depends annotation the name of the Service upon which your other service depends. Check the JMX Console to get the ObjectNames of your services.
Check out the Dependency Section here:
Thanks for the suggestion.
Personally I think the option 1 is not practical because it affects every other deployment whereas I just want to change some of the jars deployment order.
Option 2 is what I am using up to now (that's a bit of "cheating" huh :) ).
So I think option 3 more dynamic and flexible. Not sure how to do that yet, have to read over example first and again thanks for the link I think that should be what i needed.
No problem; in most cases you're really looking to introduce dependencies at the service level, not based upon order of deployment. Good luck.