[Design of JBoss Web Services] - JBWS-1133 - Exploded JSR-181 POJO Deployment Fails Redeploym
by darran.lofthouse@jboss.com
For users deploying a JSR-181 POJO deployment with an exploded WAR subsequent deployments fail as the web.xml is modified with the JBossWS servlet name. On the next deployment it is the JBossWS servlet that is checked for annotations not the endpoint class itself, this means the web service is not detected.
The only option the user has is to manually put the original web.xml back in place for each deployment / server restart.
A second minor problem is that users deploying JSR-109 POJO endpoints with an exploded war may not want their web.xml modified by JBoss, however their web service is still correctly deployed for subsequent deployments.
So far I can see the following options: -
1 - Modify org.jboss.metadata.WebMetaData so that it also reads the init-params from the web.xml, if the servlet-class is an implementation of StandardEndpointServlet then we can lookup the 'ServiceEndpointImpl' parameter and test that instead.
2 - Instead of modifying the web.xml deployment descriptor create a new file to use in place of the web.xml descriptor, this means we can write the changes to the new file without affecting the original file.
It is not currently exposed as an attribute of the MBean but the StandardContext class within Tomcat does have an attribute 'altDDName', this attribute can be set to override the name of the deployment descriptor to use so an alternative can be specified.
3 - JBossWS in addition to using the WebMetaData can also parse the web.xml to retrieve the parameters so as for 1 if the JBossWS servlet is found the 'ServiceEndpointImpl' parameter can be used to identify the correct class to check for annotations.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978538#3978538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978538