JBoss ignoring context path in application.xml when using @WebService and @Stateless in war file

StackOverflow https://stackoverflow.com/questions/5427219

I have an ear file that consists of a war file together with a number of jar files. The application.xml with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
    "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
<application>
  <display-name>Web Application</display-name>
    <module>
        <web>
           <web-uri>web-endpoint-1.0.war</web-uri>
           <context-root>/web</context-root>
        </web>
    </module>
    <module>
        <ejb>backend-1.1.jar</ejb>
    </module>
</application>

This ear file is being deployed to JBOSS AS 6 however the context-root is being ignored and the name of the war file is being used for the context root.

Can someone point out why Jboss is ignoring what is being specified in the application.xml?

Thanks!!


I have looked further into the problem and the problem is this:

In the WAR file, I have a stateless session bean to implement a web service. When I remove the stateless session beans, the context root now matches the one specified in the application.xml as required. What is the best solution to implement a web service in a war file using the @WebService annotation?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top