Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 10:10:37 -0500 (Thu, 21 Dec 2006)
New Revision: 1702
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
Log:
partial commit
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-21
14:41:08 UTC (rev 1701)
+++
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-21
15:10:37 UTC (rev 1702)
@@ -66,43 +66,37 @@
modifyWebMetaData(unit, webXml);
}
- private void modifyWebMetaData(DeploymentUnit unit, URL altDD) throws
DeploymentException
+ private void modifyWebMetaData(DeploymentUnit unit, URL webXml) throws Exception
{
- try
- {
- Set<? extends WebMetaData> allMetaData =
unit.getAllMetaData(WebMetaData.class);
- if (allMetaData.size() > 0)
- {
- WebMetaData webMetaData = allMetaData.iterator().next();
- String serviceEndpointServlet =
getServiceEndpointPublisher().getServiceEndpointServlet();
+ Set<? extends WebMetaData> allMetaData =
unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() < 1)
+ throw new DeploymentException("Cannot find WebMetaData");
- Iterator it = webMetaData.getServlets().iterator();
- while (it.hasNext())
- {
- Servlet servlet = (Servlet)it.next();
- String servletClassName = servlet.getServletClass();
+ WebMetaData webMetaData = allMetaData.iterator().next();
+ String serviceEndpointServlet =
getServiceEndpointPublisher().getServiceEndpointServlet();
- // JSP
- if (servletClassName == null)
- continue;
+ Iterator it = webMetaData.getServlets().iterator();
+ while (it.hasNext())
+ {
+ Servlet servlet = (Servlet)it.next();
+ String servletClassName = servlet.getServletClass();
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servlet) == false)
- {
- servlet.setServletClass(serviceEndpointServlet);
- NameValuePair initParam = new
NameValuePair(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL,
servletClassName);
- servlet.addInitParam(initParam);
- }
- }
+ // JSP
+ if (servletClassName == null)
+ continue;
- // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- webMetaData.setAltDDPath(altDD.toExternalForm());
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet) == false)
+ {
+ servlet.setServletClass(serviceEndpointServlet);
+ NameValuePair initParam = new
NameValuePair(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL,
servletClassName);
+ servlet.addInitParam(initParam);
}
}
- catch (Exception ex)
- {
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
- }
+
+ // FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
+ String webXmlPath = webXml.getPath();
+ webMetaData.setAltDDPath(webXmlPath);
}
private boolean isAlreadyModified(Servlet servlet)
Show replies by date