I am currently trying to understand the differences between the jboss-deployment-structure.xml and the jboss-all.xml when it comes to specifying dependencies between EARs on a single WildFly instance. As of today, we are specifying classloader dependencies between EAR files and their modules using jboss-deployment-structure.xml files. Up until now this worked perfectly well and ensured that no classloading issues occurred during the applications deployment or server startup. For me this looked like WildFly took care of resolving dependent classloaders before initializing classes from the current class loader. This was the expected the behaviour. However, recently we have noticed that the actual deployment order does not follow exactly what is specified in the jboss-deployment-structure.xml which doesn't seem to be an issue for the classloading but causes problems in a DeploymentUnitProcessor that we have recently introduced (in Phase FIRST_MODULE_USE - so after the dependency resolution took place). When investigating this issue, I came across the following article:
which outlines that for multiple EARs one needs a second file called jboss-all.xml:
As I am currently not sure how to proceed regarding the coexistence of redundant information in both files, I would like to hear your opinion in these questions:
1. Why is the jboss-deployment-structure.xml not sufficient for deriving the deployment order?
2. Does the jboss-all.xml have any impact on the classloading or just on the deployment order?
3. Are there any plans to harmonize the information in one file?