Author: thomas.diesler(a)jboss.com
Date: 2007-05-15 06:46:22 -0400 (Tue, 15 May 2007)
New Revision: 3097
Added:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/ClassLoaderInjectionDeployer.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeployment.java
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployment.java
Removed:
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerHook.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookEJB21.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookJSE.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookEJB3.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookJSE.java
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicService.java
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java
branches/tdiesler/trunk/testsuite/ant-import/build-jars-jaxws.xml
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
Log:
restructure
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerHook.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerHook.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployerHook.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -25,7 +25,11 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.logging.Logger;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.DeployerManager;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
/**
* An abstract web service deployer.
@@ -39,17 +43,72 @@
protected final Logger log = Logger.getLogger(getClass());
protected DeployerManager deployerManager;
+ protected String deploymentClass;
+ protected String serviceClass;
+ protected String endpointClass;
- public DeployerManager getDeployerManager()
+ public void setDeployerManager(DeployerManager deploymentManager)
{
- return deployerManager;
+ this.deployerManager = deploymentManager;
}
- public void setDeployerManager(DeployerManager deploymentManager)
+ public void setDeploymentClass(String deploymentClass)
{
- this.deployerManager = deploymentManager;
+ this.deploymentClass = deploymentClass;
}
+ public void setEndpointClass(String endpointClass)
+ {
+ this.endpointClass = endpointClass;
+ }
+
+ public void setServiceClass(String serviceClass)
+ {
+ this.serviceClass = serviceClass;
+ }
+
+ public Deployment createDeployment()
+ {
+ try
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class<?> clazz = loader.loadClass(deploymentClass);
+ return (Deployment)clazz.newInstance();
+ }
+ catch (Exception ex)
+ {
+ throw new WSDeploymentException("Cannot load: " + deploymentClass);
+ }
+ }
+
+ public Service createService()
+ {
+ try
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class<?> clazz = loader.loadClass(serviceClass);
+ return (Service)clazz.newInstance();
+ }
+ catch (Exception ex)
+ {
+ throw new WSDeploymentException("Cannot load: " + serviceClass);
+ }
+ }
+
+ public Endpoint createEndpoint()
+ {
+ try
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class<?> clazz = loader.loadClass(endpointClass);
+ return (Endpoint)clazz.newInstance();
+ }
+ catch (Exception ex)
+ {
+ throw new WSDeploymentException("Cannot load: " + endpointClass);
+ }
+ }
+
/** Return true if this deployment should be ignored
*/
public boolean ignoreDeployment(DeploymentUnit unit)
Copied:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/ClassLoaderInjectionDeployer.java
(from rev 3095,
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java)
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/ClassLoaderInjectionDeployer.java
(rev 0)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/ClassLoaderInjectionDeployer.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that injects the correct classloader into the Deployment
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ClassLoaderInjectionDeployer extends AbstractDeployer
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ DeploymentUnit unit = dep.getContext().getAttachment(DeploymentUnit.class);
+ if (unit == null)
+ throw new IllegalStateException("Cannot obtain deployement unit");
+
+ ClassLoader classLoader = unit.getClassLoader();
+
+ // Get the webapp context classloader and use it as the deploymet class loader
+ WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ classLoader = webMetaData.getContextLoader();
+ }
+
+ dep.setClassLoader(classLoader);
+ }
+}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookEJB21.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookEJB21.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookEJB21.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -55,7 +55,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = createDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -92,11 +92,14 @@
Class<?> epBean = loader.loadClass(ejbClass.trim());
// Create the endpoint
- Endpoint endpoint = new BasicEndpoint(service, epBean);
+ Endpoint ep = createEndpoint();
+ ep.setService(service);
+ ep.setEndpointImpl(epBean);
+
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
- endpoint.setName(ObjectNameFactory.create(nameStr));
+ ep.setName(ObjectNameFactory.create(nameStr));
- service.addEndpoint(endpoint);
+ service.addEndpoint(ep);
}
catch (ClassNotFoundException ex)
{
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookJSE.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookJSE.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXRPCDeployerHookJSE.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -29,7 +29,7 @@
import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = createDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -93,11 +93,14 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new BasicEndpoint(service, epBean);
+ Endpoint ep = createEndpoint();
+ ep.setService(service);
+ ep.setEndpointImpl(epBean);
+
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
- endpoint.setName(ObjectNameFactory.create(nameStr));
+ ep.setName(ObjectNameFactory.create(nameStr));
- service.addEndpoint(endpoint);
+ service.addEndpoint(ep);
}
catch (ClassNotFoundException ex)
{
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookEJB3.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookEJB3.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -35,7 +35,7 @@
import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.utils.ObjectNameFactory;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = createDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -81,11 +81,14 @@
Class epBean = container.getBeanClass();
// Create the endpoint
- Endpoint endpoint = new BasicEndpoint(service, epBean);
+ Endpoint ep = createEndpoint();
+ ep.setService(service);
+ ep.setEndpointImpl(epBean);
+
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
- endpoint.setName(ObjectNameFactory.create(nameStr));
+ ep.setName(ObjectNameFactory.create(nameStr));
- service.addEndpoint(endpoint);
+ service.addEndpoint(ep);
}
}
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookJSE.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookJSE.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerHookJSE.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -35,7 +35,7 @@
import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.utils.ObjectNameFactory;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = createDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -83,11 +83,14 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new BasicEndpoint(service, epBean);
+ Endpoint ep = createEndpoint();
+ ep.setService(service);
+ ep.setEndpointImpl(epBean);
+
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
- endpoint.setName(ObjectNameFactory.create(nameStr));
+ ep.setName(ObjectNameFactory.create(nameStr));
- service.addEndpoint(endpoint);
+ service.addEndpoint(ep);
}
catch (ClassNotFoundException ex)
{
Modified:
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
---
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -32,7 +32,7 @@
import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
@@ -61,7 +61,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = new BasicDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.annotationsCl);
Modified:
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
---
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -34,7 +34,7 @@
import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.utils.ObjectNameFactory;
@@ -56,7 +56,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = new UnifiedMetaDataDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.ucl);
Modified:
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
===================================================================
---
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jbws-jboss42/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -41,7 +41,7 @@
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.utils.ObjectNameFactory;
@@ -63,7 +63,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new BasicDeploymentImpl();
+ Deployment dep = new JSEDeployment();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.annotationsCl);
Deleted:
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
===================================================================
---
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50.jbossws;
-
-//$Id$
-
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that injects the correct classloader into the UMDM
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ClassLoaderInjectionDeployer extends AbstractDeployer
-{
- @Override
- public void create(Deployment dep)
- {
- DeploymentUnit unit = dep.getContext().getAttachment(DeploymentUnit.class);
- if (unit == null)
- throw new IllegalStateException("Cannot obtain deployement unit");
-
- UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
- if (umd == null)
- throw new IllegalStateException("Cannot obtain unified meta data");
-
- ClassLoader classLoader = unit.getClassLoader();
-
- // Get the webapp context classloader and use it as the deploymet class loader
- WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- classLoader = webMetaData.getContextLoader();
- }
-
- umd.setClassLoader(classLoader);
- }
-}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/jbws-jboss50/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-15
10:46:22 UTC (rev 3097)
@@ -173,6 +173,8 @@
Register DeployerHooks with JBoss deployers
-->
<bean name="WSDeployerHook_JAXRPC_JSE"
class="org.jboss.ws.integration.jboss50.JAXRPCDeployerHookJSE">
+ <property
name="deploymentClass">org.jboss.ws.core.deployment.UnifiedMetaDataDeployment</property>
+ <property
name="endpointClass">org.jboss.ws.integration.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerJSE"/></property>
<install bean="WebServiceDeployerJSE"
method="addDeployerHook">
<parameter>
@@ -187,6 +189,8 @@
<depends>WebServiceDeployerJSE</depends>
</bean>
<bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.ws.integration.jboss50.JAXRPCDeployerHookEJB21">
+ <property
name="deploymentClass">org.jboss.ws.core.deployment.UnifiedMetaDataDeployment</property>
+ <property
name="endpointClass">org.jboss.ws.integration.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerEJB"/></property>
<install bean="WebServiceDeployerEJB"
method="addDeployerHook">
<parameter>
@@ -201,6 +205,8 @@
<depends>WebServiceDeployerEJB</depends>
</bean>
<bean name="WSDeployerHook_JAXWS_JSE"
class="org.jboss.ws.integration.jboss50.JAXWSDeployerHookJSE">
+ <property
name="deploymentClass">org.jboss.ws.core.deployment.UnifiedMetaDataDeployment</property>
+ <property
name="endpointClass">org.jboss.ws.integration.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerJSE"/></property>
<install bean="WebServiceDeployerJSE"
method="addDeployerHook">
<parameter>
@@ -215,6 +221,8 @@
<depends>WebServiceDeployerJSE</depends>
</bean>
<bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.ws.integration.jboss50.JAXWSDeployerHookEJB3">
+ <property
name="deploymentClass">org.jboss.ws.core.deployment.UnifiedMetaDataDeployment</property>
+ <property
name="endpointClass">org.jboss.ws.integration.BasicEndpoint</property>
<property name="deployerManager"><inject
bean="WSDeployerManagerEJB"/></property>
<install bean="WebServiceDeployerEJB"
method="addDeployerHook">
<parameter>
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicEndpoint.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicEndpoint.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -79,10 +79,8 @@
private LifecycleHandler lifecycleHandler;
private Map<Class, Object> metaData = new HashMap<Class, Object>();
- public BasicEndpoint(Service service, Class impl)
+ public BasicEndpoint()
{
- this.service = service;
- this.endpointImpl = impl;
this.state = EndpointState.UNDEFINED;
}
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicService.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicService.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/BasicService.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -72,23 +72,23 @@
*/
public class BasicService implements Service
{
- private Deployment unit;
+ private Deployment dep;
private List<Endpoint> endpoints = new LinkedList<Endpoint>();
- public BasicService(Deployment unit)
+ public BasicService(Deployment dep)
{
- this.unit = unit;
- this.unit.setService(this);
+ this.dep = dep;
+ this.dep.setService(this);
}
public Deployment getDeployment()
{
- return unit;
+ return dep;
}
- public void setDeployment(Deployment unit)
+ public void setDeployment(Deployment dep)
{
- this.unit = unit;
+ this.dep = dep;
}
public void addEndpoint(Endpoint endpoint)
Copied:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeployment.java
(from rev 3095,
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java)
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeployment.java
(rev 0)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeployment.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -0,0 +1,140 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.BasicService;
+import org.jboss.ws.integration.Service;
+
+/**
+ * A general web service deployment dep.
+ *
+ * It has no notion of J2EE deployment packages.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeployment implements Deployment
+{
+ // The context for this deployment dep
+ private DeploymentContext context;
+ // A deployment has one service
+ private Service service;
+ // The type of this deployment
+ private DeploymentType type;
+ // The state for this deployment
+ private DeploymentState state;
+ // The deployment class loader
+ private ClassLoader classLoader;
+
+ public BasicDeployment()
+ {
+ context = new BasicDeploymentContext();
+ service = new BasicService(this);
+ state = DeploymentState.UNDEFINED;
+ }
+
+ public DeploymentContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(DeploymentContext context)
+ {
+ this.context = context;
+ }
+
+ public void setClassLoader(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ this.service = service;
+ }
+
+ public DeploymentState getState()
+ {
+ return state;
+ }
+
+ public void setState(DeploymentState deploymentState)
+ {
+ this.state = deploymentState;
+ }
+
+ public DeploymentType getType()
+ {
+ return type;
+ }
+
+ public void setType(DeploymentType deploymentType)
+ {
+ this.type = deploymentType;
+ }
+}
Deleted:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -1,140 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration.deployment;
-
-//$Id$
-
-import org.jboss.ws.integration.BasicService;
-import org.jboss.ws.integration.Service;
-
-/**
- * A general web service deployment dep.
- *
- * It has no notion of J2EE deployment packages.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class BasicDeploymentImpl implements Deployment
-{
- // The context for this deployment dep
- private DeploymentContext context;
- // A deployment has one service
- private Service service;
- // The type of this deployment
- private DeploymentType type;
- // The state for this deployment
- private DeploymentState state;
- // The deployment class loader
- private ClassLoader classLoader;
-
- public BasicDeploymentImpl()
- {
- context = new BasicDeploymentContext();
- service = new BasicService(this);
- state = DeploymentState.UNDEFINED;
- }
-
- public DeploymentContext getContext()
- {
- return context;
- }
-
- public void setContext(DeploymentContext context)
- {
- this.context = context;
- }
-
- public void setClassLoader(ClassLoader loader)
- {
- this.classLoader = loader;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- this.service = service;
- }
-
- public DeploymentState getState()
- {
- return state;
- }
-
- public void setState(DeploymentState deploymentState)
- {
- this.state = deploymentState;
- }
-
- public DeploymentType getType()
- {
- return type;
- }
-
- public void setType(DeploymentType deploymentType)
- {
- this.type = deploymentType;
- }
-}
Modified:
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java
===================================================================
---
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployer.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -49,7 +49,7 @@
{
UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
if (udi == null)
- throw new IllegalStateException("Cannot obtain unified deployement
info");
+ throw new IllegalStateException("Cannot obtain unified deployment
info");
if (udi.type == DeploymentType.JAXRPC_JSE)
{
Added:
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployment.java
===================================================================
---
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployment.java
(rev 0)
+++
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployment.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -0,0 +1,82 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.core.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.deployment.BasicDeployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployment that injects the ClassLoader into the UnifiedMetaDataModel
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class UnifiedMetaDataDeployment extends BasicDeployment
+{
+ @Override
+ public void setClassLoader(ClassLoader classLoader)
+ {
+ super.setClassLoader(classLoader);
+
+ UnifiedMetaData umd = getContext().getAttachment(UnifiedMetaData.class);
+ if (umd != null)
+ {
+ umd.setClassLoader(classLoader);
+ }
+ }
+}
Property changes on:
branches/tdiesler/trunk/jbossws/src/main/java/org/jboss/ws/core/deployment/UnifiedMetaDataDeployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/tdiesler/trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- branches/tdiesler/trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-15 08:10:01
UTC (rev 3096)
+++ branches/tdiesler/trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-05-15 10:46:22
UTC (rev 3097)
@@ -39,7 +39,7 @@
</jar>
<jar jarfile="${tests.output.dir}/libs/jaxws-eardeployment.ear">
<fileset dir="${tests.output.dir}/libs">
- <!--include name="jaxws-eardeployment.jar"/-->
+ <include name="jaxws-eardeployment.jar"/>
<include name="jaxws-eardeployment.war"/>
</fileset>
<metainf
dir="${tests.output.dir}/resources/jaxws/eardeployment/META-INF">
Modified:
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java
===================================================================
---
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-05-15
08:10:01 UTC (rev 3096)
+++
branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/eardeployment/EarTestCase.java 2007-05-15
10:46:22 UTC (rev 3097)
@@ -45,7 +45,7 @@
return JBossWSTestSetup.newTestSetup(EarTestCase.class, earName);
}
- public void _testEJB3Endpoint() throws Exception
+ public void testEJB3Endpoint() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/earejb3/EJB3Bean?wsdl");
QName serviceName = new
QName("http://eardeployment.jaxws.ws.test.jboss.org/",
"TestEndpointService");