The context-root of an EAR file is taken from the application.xml incase if you have specified the context-root, otherwise take it from the warfile name.
In your case, you have to configure the context path in application.xml file as shown below.
<module> <web> <web-uri>my-application-1.1.war</web-uri> <context-root>my-application</context-root> </web> </module>
ViSolve JBoss Team
Thanks for the reply, but your example changes the war context root, not the ear context root.
I am trying to change the context root of the ear being deployed, not the war.
i.e. if i deploy an ear named my-ear-1.2.ear containing a war my-war-1.2.war it will deploy with the JNDI context
If i do what you say and add the following application.xml
<module> <web> <web-uri>my-war-1.2.war</web-uri> <context-root>my-war</context-root> </web> </module>
it will deploy with JNDI context of
What I want to be able to do is deploy my ear to the following JNDI context, for example.