JBossWS SVN: r1711 - branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 16:26:25 -0500 (Thu, 21 Dec 2006)
New Revision: 1711
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
Log:
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 21:26:21 UTC (rev 1710)
+++ branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-21 21:26:25 UTC (rev 1711)
@@ -34,6 +34,7 @@
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
+import org.jboss.ws.core.server.AbstractServiceEndpointPublisher.RewriteResults;
/**
* An abstract deployer for JSE Endpoints
@@ -61,12 +62,13 @@
// FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
InputStream stream = unit.getDeploymentContext().getRoot().findChild("WEB-INF/web.xml").openStream();
- URL webXml = getServiceEndpointPublisher().rewriteWebXml(stream, null, unit.getClassLoader());
-
- modifyWebMetaData(unit, webXml);
+ RewriteResults results = getServiceEndpointPublisher().rewriteWebXml(stream, null, unit.getClassLoader());
+
+ URL webXML = results.webXML;
+ modifyWebMetaData(unit, webXML);
}
- private void modifyWebMetaData(DeploymentUnit unit, URL webXml) throws Exception
+ private void modifyWebMetaData(DeploymentUnit unit, URL webXML) throws Exception
{
Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
if (allMetaData.size() < 1)
@@ -95,7 +97,7 @@
}
// FIXME: JBAS-3812 - TomcatDeployment should use modified WebMetaData
- String webXmlPath = webXml.getPath();
+ String webXmlPath = webXML.getPath();
webMetaData.setAltDDPath(webXmlPath);
}
18 years
JBossWS SVN: r1710 - branches/tdiesler/trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 16:26:21 -0500 (Thu, 21 Dec 2006)
New Revision: 1710
Modified:
branches/tdiesler/trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
Log:
Modified: branches/tdiesler/trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
===================================================================
--- branches/tdiesler/trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java 2006-12-21 21:26:18 UTC (rev 1709)
+++ branches/tdiesler/trunk/integration-tomcat/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java 2006-12-21 21:26:21 UTC (rev 1710)
@@ -77,7 +77,7 @@
public String publishServiceEndpoint(URL warURL) throws Exception
{
- new wspublish().process(warURL, targetDir, servletName);
+ new wspublish().process(warURL, targetDir, getServiceEndpointServlet());
return "OK";
}
18 years
JBossWS SVN: r1709 - branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 16:26:18 -0500 (Thu, 21 Dec 2006)
New Revision: 1709
Modified:
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
Log:
Modified: branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
===================================================================
--- branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2006-12-21 18:02:15 UTC (rev 1708)
+++ branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2006-12-21 21:26:18 UTC (rev 1709)
@@ -27,8 +27,10 @@
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import javax.servlet.Servlet;
@@ -48,18 +50,26 @@
*/
public abstract class AbstractServiceEndpointPublisher
{
- // default bean name
+ // logging support
+ private static Logger log = Logger.getLogger(AbstractServiceEndpointPublisher.class);
+
+ // The default bean name
public static final String BEAN_NAME = "ServiceEndpointPublisher";
-
// The servlet init param in web.xml that is the service endpoint class
public static final String INIT_PARAM_SERVICE_ENDPOINT_IMPL = "ServiceEndpointImpl";
- // logging support
- private static Logger log = Logger.getLogger(AbstractServiceEndpointPublisher.class);
-
// The configured service endpoint servlet
- protected String servletName;
+ private String servletName;
+ // The results of the URL rewriting
+ public class RewriteResults
+ {
+ // The URL to the rewrittn web.xml
+ public URL webXML;
+ // Map<servlet-name, servlet-class> the servlet-class enties are the implementation beans
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+ }
+
public String getServiceEndpointServlet()
{
return servletName;
@@ -74,14 +84,8 @@
public abstract String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
- public URL rewriteWebXml(UnifiedDeploymentInfo udi)
+ public RewriteResults rewriteWebXml(URL warURL)
{
- URL warURL = udi.expandedWebApp;
- return rewriteWebXml(warURL);
- }
-
- public URL rewriteWebXml(URL warURL)
- {
File warFile = new File(warURL.getFile());
if (warFile.isDirectory() == false)
throw new WSException("Expected a war directory: " + warURL);
@@ -113,7 +117,7 @@
}
}
- public URL rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
+ public RewriteResults rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
{
if (dest == null)
{
@@ -122,18 +126,20 @@
}
Element root = DOMUtils.parse(source);
- modifyServletConfig(root, loader);
+ RewriteResults results = modifyServletConfig(root, loader);
+ results.webXML = dest.toURL();
FileOutputStream fos = new FileOutputStream(dest);
new DOMWriter(fos).setPrettyprint(true).print(root);
fos.flush();
fos.close();
- return dest.toURL();
+ return results;
}
- private void modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
+ private RewriteResults modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
{
+ RewriteResults results = new RewriteResults();
Iterator itServlets = DOMUtils.getChildElements(root, "servlet");
while (itServlets.hasNext())
{
@@ -166,8 +172,22 @@
String targetBeanName = null;
// Nothing to do if we have an <init-param>
- if (isAlreadyModified(servletElement) == false)
+ if (isAlreadyModified(servletElement))
{
+ Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
+ while (itParams.hasNext())
+ {
+ Element elParam = (Element)itParams.next();
+ Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
+ Element elParamValue = DOMUtils.getFirstChildElement(elParam, "param-value");
+ if (INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(DOMUtils.getTextContent(elParamName)))
+ {
+ targetBeanName = DOMUtils.getTextContent(elParamValue);
+ }
+ }
+ }
+ else
+ {
// Check if it is a real servlet that we can ignore
if (servletClass != null && JavaUtils.isAssignableFrom(Servlet.class, servletClass))
{
@@ -224,24 +244,15 @@
servletElement.appendChild(el);
}
}
- else
- {
- Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
- while (itParams.hasNext())
- {
- Element elParam = (Element)itParams.next();
- Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
- Element elParamValue = DOMUtils.getFirstChildElement(elParam, "param-value");
- if (INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(DOMUtils.getTextContent(elParamName)))
- {
- targetBeanName = DOMUtils.getTextContent(elParamValue);
- }
- }
- }
if (targetBeanName == null)
throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName.trim());
}
+
+ return results;
}
// Return true if the web.xml is already modified
18 years
JBossWS SVN: r1708 - branches/tdiesler/trunk/build
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 13:02:15 -0500 (Thu, 21 Dec 2006)
New Revision: 1708
Modified:
branches/tdiesler/trunk/build/build.xml
Log:
partial commit
Modified: branches/tdiesler/trunk/build/build.xml
===================================================================
--- branches/tdiesler/trunk/build/build.xml 2006-12-21 18:02:08 UTC (rev 1707)
+++ branches/tdiesler/trunk/build/build.xml 2006-12-21 18:02:15 UTC (rev 1708)
@@ -382,6 +382,8 @@
</metainf>
</jar>
+ <echo message="${integration.jboss42.dir}/src/resources/jbossws.sar"/>
+
<!-- Build jbossws42.sar -->
<jar jarfile="${build.lib.dir}/jbossws42.sar" manifest="${build.etc.dir}/default.mf">
<fileset dir="${build.lib.dir}">
@@ -400,7 +402,7 @@
<include name="xmlsec.jar"/>
</fileset>
<fileset dir="${integration.jboss42.dir}/src/resources">
- <include name="jbossws.beans/META-INF/jbossws-beans.xml"/>
+ <include name="jbossws.beans/META-INF/jboss-beans.xml"/>
</fileset>
<metainf dir="${jbossws.resources.dir}/jbossws.sar/META-INF">
<include name="standard-jaxrpc-client-config.xml"/>
@@ -408,6 +410,9 @@
<include name="standard-jaxws-client-config.xml"/>
<include name="standard-jaxws-endpoint-config.xml"/>
</metainf>
+ <metainf dir="${integration.jboss42.dir}/src/resources/jbossws.sar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
</jar>
</target>
18 years
JBossWS SVN: r1707 - branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 13:02:08 -0500 (Thu, 21 Dec 2006)
New Revision: 1707
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
Log:
partial commit
Modified: branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-12-21 18:01:53 UTC (rev 1706)
+++ branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-12-21 18:02:08 UTC (rev 1707)
@@ -60,7 +60,7 @@
/** Deploy the web service endpoints if there are any
*/
@Override
- public void deploy(DeploymentUnit unit) throws DeploymentException
+ public final void deploy(DeploymentUnit unit) throws DeploymentException
{
boolean isComponent = unit.getDeploymentContext().isComponent();
if (isComponent == false && isWebServiceDeployment(unit))
@@ -83,14 +83,14 @@
if (udi != null)
undeployInternal(unit, udi);
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ DeploymentException.rethrowAsDeploymentException("Cannot create service endpoint", ex);
}
}
/** Undeploy the web service endpoints if there are any
*/
@Override
- public void undeploy(DeploymentUnit unit)
+ public final void undeploy(DeploymentUnit unit)
{
boolean isComponent = unit.getDeploymentContext().isComponent();
UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(unit);
18 years
JBossWS SVN: r1706 - branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 13:01:53 -0500 (Thu, 21 Dec 2006)
New Revision: 1706
Modified:
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
Log:
partial commit
Modified: branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
===================================================================
--- branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2006-12-21 18:01:41 UTC (rev 1705)
+++ branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2006-12-21 18:01:53 UTC (rev 1706)
@@ -42,9 +42,6 @@
* container (i.e. JBoss, Tomcat). The containers deployer architecture should be used to populate
* the UnifiedDeploymentInfo object.
*
- * @deprecated
- * This functionality should be handled by the ServiceEndpointManager
- *
* @author Thomas.Diesler(a)jboss.org
* @since 12-May-2006
*/
Modified: branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
--- branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-21 18:01:41 UTC (rev 1705)
+++ branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-21 18:01:53 UTC (rev 1706)
@@ -583,7 +583,10 @@
{
ServiceEndpoint wsEndpoint = getServiceEndpointByID(sepID);
if (wsEndpoint == null)
- throw new WSException("Cannot find service endpoint: " + sepID);
+ {
+ log.error("Cannot find service endpoint: " + sepID);
+ return;
+ }
wsEndpoint.stop();
@@ -597,7 +600,10 @@
{
ServiceEndpoint wsEndpoint = getServiceEndpointByID(sepID);
if (wsEndpoint == null)
- throw new WSException("Cannot find service endpoint: " + sepID);
+ {
+ log.error("Cannot find service endpoint: " + sepID);
+ return;
+ }
wsEndpoint.destroy();
Modified: branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java
===================================================================
--- branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2006-12-21 18:01:41 UTC (rev 1705)
+++ branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/server/UnifiedDeploymentInfo.java 2006-12-21 18:01:53 UTC (rev 1706)
@@ -68,12 +68,7 @@
public ClassLoader classLoader;
/** An arbitrary map of state associated with the deployment */
public Map<String, Object> context = new HashMap<String, Object>();
-
- // [TODO] unify jboss42 properties
- public URL localUrl;
- public URLClassLoader annotationsCl;
- public URLClassLoader localCl;
- public URLClassLoader ucl;
+ /** An optional ObjectName of the deployed object */
public ObjectName deployedObject;
/** The sortName concatenated with the canonical names of all parents. */
18 years
JBossWS SVN: r1705 - in branches/tdiesler/trunk/integration-jboss42/src: main/java/org/jboss/ws/integration/jboss42 resources resources/jbossws.beans resources/jbossws.beans/META-INF resources/jbossws.sar resources/jbossws.sar/META-INF
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 13:01:41 -0500 (Thu, 21 Dec 2006)
New Revision: 1705
Added:
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml
Removed:
branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/jbossws-beans.xml
Modified:
branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java
branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
Log:
partial commit
Modified: branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2006-12-21 18:01:41 UTC (rev 1705)
@@ -23,6 +23,7 @@
//$Id$
+import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.MainDeployerMBean;
import org.jboss.deployment.SubDeployerInterceptorSupport;
@@ -67,17 +68,22 @@
/** Overwrite to create the webservice
*/
- protected Object create(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected final Object create(Invocation invocation, DeploymentInfo di) throws Throwable
{
log.debug("create: " + di.url);
-
Object retn = invokeNext(invocation);
if (isWebserviceDeployment(di))
{
- UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(di);
- di.context.put(UnifiedDeploymentInfo.class.getName(), udi);
- getServiceEndpointDeployer().create(udi);
+ try
+ {
+ createServiceEndpoint(di);
+ }
+ catch (Exception ex)
+ {
+ destroyServiceEndpoint(di);
+ DeploymentException.rethrowAsDeploymentException("Cannot create service endpoint", ex);
+ }
}
return retn;
@@ -85,13 +91,56 @@
/** Overwrite to start the webservice
*/
- protected Object start(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected final Object start(Invocation invocation, DeploymentInfo di) throws Throwable
{
log.debug("start: " + di.url);
-
Object retn = invokeNext(invocation);
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ try
+ {
+ startServiceEndpoint(di);
+ }
+ catch (Exception ex)
+ {
+ destroyServiceEndpoint(di);
+ DeploymentException.rethrowAsDeploymentException("Cannot start service endpoint", ex);
+ }
+
+ return retn;
+ }
+
+ /** Overwrite to stop the webservice
+ */
+ protected final Object stop(Invocation invocation, DeploymentInfo di) throws Throwable
+ {
+ log.debug("stop: " + di.url);
+
+ stopServiceEndpoint(di);
+
+ return invokeNext(invocation);
+ }
+
+ /** Overwrite to destroy the webservice
+ */
+ protected final Object destroy(Invocation invocation, DeploymentInfo di) throws Throwable
+ {
+ log.debug("destroy: " + di.url);
+
+ destroyServiceEndpoint(di);
+
+ return invokeNext(invocation);
+ }
+
+ protected void createServiceEndpoint(DeploymentInfo di) throws Exception
+ {
+ UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(di);
+ di.context.put(UnifiedDeploymentInfo.class.getName(), udi);
+ getServiceEndpointDeployer().create(udi);
+ }
+
+ protected void startServiceEndpoint(DeploymentInfo di) throws Exception
+ {
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
// late initialization of the web context loader
@@ -103,38 +152,24 @@
getServiceEndpointDeployer().start(udi);
}
-
- return retn;
}
- /** Overwrite to stop the webservice
- */
- protected Object stop(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected void stopServiceEndpoint(DeploymentInfo di) throws Exception
{
- log.debug("stop: " + di.url);
-
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
getServiceEndpointDeployer().stop(udi);
}
-
- return invokeNext(invocation);
}
- /** Overwrite to destroy the webservice
- */
- protected Object destroy(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected void destroyServiceEndpoint(DeploymentInfo di) throws Exception
{
- log.debug("destroy: " + di.url);
-
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
getServiceEndpointDeployer().destroy(udi);
}
-
- return invokeNext(invocation);
}
protected ServiceEndpointDeployer getServiceEndpointDeployer()
@@ -150,14 +185,14 @@
KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
return (AbstractServiceEndpointPublisher)entry.getTarget();
}
-
+
/** Return true if the deployment contains a web service endpoint
*/
protected abstract boolean isWebserviceDeployment(DeploymentInfo di);
- protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Throwable;
+ protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws Exception;
- protected UnifiedDeploymentInfo getServiceEndpointDeployment(DeploymentInfo di)
+ protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentInfo di)
{
return (UnifiedDeploymentInfo)di.context.get(UnifiedDeploymentInfo.class.getName());
}
Modified: branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB.java 2006-12-21 18:01:41 UTC (rev 1705)
@@ -39,32 +39,28 @@
*/
public abstract class DeployerInterceptorEJB extends DeployerInterceptor
{
- protected Object create(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected void createServiceEndpoint(DeploymentInfo di) throws Exception
{
- Object retObj = super.create(invocation, di);
+ super.createServiceEndpoint(di);
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
- udi.localUrl = generateWebDeployment(di, wsMetaData);
+ udi.expandedWebApp = generateWebDeployment(di, wsMetaData);
udi.context.put(DeploymentInfo.class.getName(), di);
getServiceEndpointPublisher().publishServiceEndpoint(udi);
}
-
- return retObj;
}
protected abstract URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData) throws IOException;
- protected Object destroy(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected void destroyServiceEndpoint(DeploymentInfo di) throws Exception
{
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
getServiceEndpointPublisher().destroyServiceEndpoint(udi);
}
-
- return super.destroy(invocation, di);
}
}
Modified: branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2006-12-21 18:01:41 UTC (rev 1705)
@@ -59,7 +59,6 @@
URL webservicesURL = getWebservicesDescriptor(di);
udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE, webservicesURL);
DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
-
}
else if (type == UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE)
{
@@ -78,17 +77,15 @@
*
* This implemantation modifies the servlet entries in web.xml
*/
- protected Object create(Invocation invocation, DeploymentInfo di) throws Throwable
+ protected void createServiceEndpoint(DeploymentInfo di) throws Exception
{
- Object retn = super.create(invocation, di);
-
- UnifiedDeploymentInfo udi = getServiceEndpointDeployment(di);
+ super.createServiceEndpoint(di);
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
if (udi != null)
{
AbstractServiceEndpointPublisher endpointPublisher = getServiceEndpointPublisher();
endpointPublisher.rewriteWebXml(udi);
}
- return retn;
}
/** Return true if the deployment is a web service endpoint
Modified: branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2006-12-21 18:01:41 UTC (rev 1705)
@@ -23,6 +23,10 @@
// $Id$
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
@@ -36,26 +40,38 @@
*/
public class DeploymentInfoAdaptor
{
- public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
+ public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di) throws Exception
{
if (di.parent != null)
{
udi.parent = new UnifiedDeploymentInfo(null);
buildDeploymentInfo(udi.parent, di.parent);
}
-
+
+ udi.name = di.getCanonicalName();
udi.simpleName = di.shortName;
- udi.url = di.url;
- udi.localUrl = di.localUrl;
+ udi.url = getDeploymentURL(di);
udi.metaData = buildMetaData(di.metaData);
- udi.annotationsCl = di.annotationsCl;
- udi.localCl = di.localCl;
- udi.ucl = di.ucl;
+ udi.classLoader = di.annotationsCl;
udi.deployedObject = di.deployedObject;
return udi;
}
+ private static URL getDeploymentURL(DeploymentInfo di) throws MalformedURLException
+ {
+ URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
+ if ("file".equals(deploymentURL.getProtocol()))
+ {
+ String path = deploymentURL.getPath();
+ if (new File(path).isFile())
+ {
+ deploymentURL = new URL("jar:file:" + path + "!/");
+ }
+ }
+ return deploymentURL;
+ }
+
private static Object buildMetaData(Object metaData)
{
Object retMetaData = null;
Modified: branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointPublisher.java 2006-12-21 18:01:41 UTC (rev 1705)
@@ -49,7 +49,7 @@
public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- URL warURL = udi.localUrl;
+ URL warURL = udi.expandedWebApp;
DeploymentInfo di = (DeploymentInfo)udi.context.get(DeploymentInfo.class.getName());
if (di == null)
throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
@@ -65,7 +65,7 @@
public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- getMainDeployer().undeploy(udi.localUrl);
+ getMainDeployer().undeploy(udi.expandedWebApp);
return "OK";
}
Added: branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2006-12-21 18:01:41 UTC (rev 1705)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+
+ <bean name="ServiceEndpointManager" class="org.jboss.ws.core.server.ServiceEndpointManager">
+
+ <!--
+ The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+ element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+
+ If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'alwaysModifySOAPAddress' is true.
+ If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+
+ If 'webServiceHost' is an empty string, JBossWS uses requesters host when rewriting the <soap:address>.
+ -->
+ <property name="webServiceHost">${jboss.bind.address}</property>
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ <property name="alwaysModifySOAPAddress">true</property>
+
+ <property name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
+ <property name="serviceEndpointInvokerEJB3">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3</property>
+ <property name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB21</property>
+ <property name="serviceEndpointInvokerMDB">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerMDB</property>
+ </bean>
+
+ <bean name="ServiceEndpointDeployer" class="org.jboss.ws.core.server.ServiceEndpointDeployer">
+ <property name="serviceEndpointManager">
+ <inject bean="ServiceEndpointManager"/>
+ </property>
+ </bean>
+
+ <bean name="ServiceEndpointPublisher" class="org.jboss.ws.integration.jboss42.ServiceEndpointPublisher">
+ <property name="serviceEndpointServlet">org.jboss.ws.integration.jboss42.JBossServiceEndpointServlet</property>
+ </bean>
+
+ <!-- A subscription manager for WS-Eventing -->
+ <bean name="SubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
+
+ <bean name="ServerConfig" class="org.jboss.ws.integration.jboss42.ServerConfigImpl"/>
+
+ <bean name="KernelLocator" class="org.jboss.ws.core.server.KernelLocator">
+ <!--property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property-->
+ </bean>
+
+</deployment>
Property changes on: branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/jbossws-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/jbossws-beans.xml 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.beans/jbossws-beans.xml 2006-12-21 18:01:41 UTC (rev 1705)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="ServiceEndpointManager" class="org.jboss.ws.core.server.ServiceEndpointManager">
-
- <!--
- The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
- element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
-
- If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'alwaysModifySOAPAddress' is true.
- If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
-
- If 'webServiceHost' is an empty string, JBossWS uses requesters host when rewriting the <soap:address>.
- -->
- <property name="webServiceHost">${jboss.bind.address}</property>
- <property name="webServiceSecurePort">8443</property>
- <property name="webServicePort">8080</property>
- <property name="alwaysModifySOAPAddress">true</property>
-
- <property name="serviceEndpointInvokerJSE">org.jboss.ws.core.server.ServiceEndpointInvokerJSE</property>
- <property name="serviceEndpointInvokerEJB3">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB3</property>
- <property name="serviceEndpointInvokerEJB21">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerEJB21</property>
- <property name="serviceEndpointInvokerMDB">org.jboss.ws.integration.jboss42.ServiceEndpointInvokerMDB</property>
- </bean>
-
- <bean name="ServiceEndpointDeployer" class="org.jboss.ws.core.server.ServiceEndpointDeployer">
- <property name="serviceEndpointManager">
- <inject bean="ServiceEndpointManager"/>
- </property>
- </bean>
-
- <bean name="ServiceEndpointPublisher" class="org.jboss.ws.integration.jboss42.JBoss42ServiceEndpointPublisher">
- <property name="mainDeployer"><inject bean="MainDeployer"/></property>
- <property name="serviceEndpointServlet">org.jboss.ws.integration.jboss42.JBossServiceEndpointServlet</property>
- </bean>
-
- <!-- Bind JAXRPC Service objects in application client environment context -->
- <bean name="ServiceRefHandler" class="org.jboss.ws.integration.jboss42.ServiceRefHandler"/>
-
- <!-- A subscription manager for WS-Eventing -->
- <bean name="SubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
-
- <bean name="ServerConfig" class="org.jboss.ws.integration.jboss42.ServerConfigImpl"/>
-
- <bean name="KernelLocator" class="org.jboss.ws.core.server.KernelLocator">
- <!--property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property-->
- </bean>
-
-</deployment>
Added: branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
--- branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml 2006-12-21 15:27:43 UTC (rev 1704)
+++ branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml 2006-12-21 18:01:41 UTC (rev 1705)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<server>
+
+ <!--
+ A deployer service for WS clients.
+ -->
+ <mbean name="jboss.ws:service=WebServiceClientDeployer" code="org.jboss.ws.integration.jboss42.WebServiceClientDeployer">
+ <depends>jboss:service=Naming</depends>
+ </mbean>
+
+ <!--
+ A deployer service for JSE endpoints.
+ -->
+ <mbean name="jboss.ws:service=WebServiceDeployerJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.web:service=WebServer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!--
+ A deployer service for EJB2.1 endpoints.
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!--
+ A deployer service for EJB3 endpoints.
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!--
+ A deployer service for JSE endpoints that are nested in service archives (sar).
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorNestedJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorNestedJSE">
+ <depends optional-attribute-name="MainDeployer" proxy-type="attribute">jboss.system:service=MainDeployer</depends>
+ <depends>jboss.ws:service=WebServiceDeployerJSE</depends>
+ </mbean>
+
+</server>
Property changes on: branches/tdiesler/trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years
JBossWS SVN: r1704 - branches/tdiesler/trunk/build
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 10:27:43 -0500 (Thu, 21 Dec 2006)
New Revision: 1704
Modified:
branches/tdiesler/trunk/build/ant.properties.example
Log:
partial commit
Modified: branches/tdiesler/trunk/build/ant.properties.example
===================================================================
--- branches/tdiesler/trunk/build/ant.properties.example 2006-12-21 15:27:39 UTC (rev 1703)
+++ branches/tdiesler/trunk/build/ant.properties.example 2006-12-21 15:27:43 UTC (rev 1704)
@@ -1,11 +1,15 @@
#
# A sample ant properties file
#
+# $Id$
# Required JBoss Home
#jboss50.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2
#jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.CR1-ejb3
+# The JBoss server under test. This can be [jboss42|jboss50]
+jboss.integration.target=jboss50
+
# The JBoss server instance
jboss.server.instance=default
@@ -14,8 +18,7 @@
tomcat.manager.username=manager
tomcat.manager.password=manager
-# The target server the test endpoints are deployed to
-# This can be [jboss|tomcat]
+# The target server the test endpoints are deployed to. This can be [jboss|tomcat]
jbossws.target.server=jboss
# JBoss Repository
18 years
JBossWS SVN: r1703 - branches/tdiesler/trunk/jbossws/src/test
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 10:27:39 -0500 (Thu, 21 Dec 2006)
New Revision: 1703
Modified:
branches/tdiesler/trunk/jbossws/src/test/build.xml
Log:
partial commit
Modified: branches/tdiesler/trunk/jbossws/src/test/build.xml
===================================================================
--- branches/tdiesler/trunk/jbossws/src/test/build.xml 2006-12-21 15:10:37 UTC (rev 1702)
+++ branches/tdiesler/trunk/jbossws/src/test/build.xml 2006-12-21 15:27:39 UTC (rev 1703)
@@ -44,7 +44,14 @@
</not>
</condition>
- <property name="jboss.home" value="${jboss50.home}"/>
+ <!-- Define jboss.home -->
+ <condition property="jboss.home" value="${jboss50.home}">
+ <equals arg1="${jboss.integration.target}" arg2="jboss50"/>
+ </condition>
+ <condition property="jboss.home" value="${jboss42.home}">
+ <equals arg1="${jboss.integration.target}" arg2="jboss42"/>
+ </condition>
+
<property name="jboss.client" value="${jboss.home}/client"/>
<property name="jboss.lib" value="${jboss.home}/lib"/>
<property name="jboss.server" value="${jboss.home}/server/${jboss.server.instance}"/>
@@ -144,7 +151,7 @@
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.server.deploy}/ejb3.deployer/jboss-ejb3x.jar"/>
- <pathelement location="${build.lib.dir}/jbossws-jboss50-integration.jar"/>
+ <pathelement location="${build.lib.dir}/jbossws-${jboss.integration.target}-integration.jar"/>
<pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
</path>
@@ -154,7 +161,7 @@
-->
<path id="test.client.classpath">
<path refid="jbossws.client.classpath"/>
- <pathelement location="${build.lib.dir}/jbossws-jboss50-integration.jar"/>
+ <pathelement location="${build.lib.dir}/jbossws-${jboss.integration.target}-integration.jar"/>
<pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
<pathelement location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
18 years
JBossWS SVN: r1702 - branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50
by jbossws-commits@lists.jboss.org
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)
18 years