Tomcat has certain restrictions about binding to the root context.
Can you try saying contextRoot="ROOT"? Also make sure you don't have a ROOT.war deployed.
Okay, I removed the default ROOT.war, and changed the annotation to read contextRoot="ROOT", but that seems to cause it to ignore the @PortComponent entirely - it deploys to the default /earname-jarname/ context, with the default name.
btw, my application.xml is like this:
<application> <display-name>MyExample</display-name> <module> <web> <web-uri>example.war</web-uri> <context-root>/</context-root> </web> </module> <module> <ejb>example.jar</ejb> </module> </application>
There is no context root specified in the web.xml.
Is example.war a servlet deployment? If so, it would conflict with the generated war for the service. Otherwise you don't need that entry.
Can you also try contextRoot=""?
Otherwise, I believe, we may need to add special support for this for EJB endpoints.
In the meantime you could do with this with a war style deployment.