We use jBoss in our development environment to deploy to. There are many applications deployed there for which the context root of the application is not necessarily named after the WAR.
For example, the application may be called abc_microsite and have a context root of Getoutoftrouble.
EAR pom.xml:
<webModule>
<groupId>company</groupId>
<artifactId>abc_microsite-war</artifactId>
<contextRoot>Getoutoftrouble</contextRoot>
</webModule>
What will happen if more than one EAR is deployed with the same context root? How will jBoss handle a request to http://server/Getoutoftrouble ? OR Will you get an error when you try to deploy the EAR?
You will get an error on trying to deploy second context root with the same name.
It should be very easy to reproduce and check. 🙂