Author: thomas.diesler(a)jboss.com
Date: 2007-07-17 06:48:13 -0400 (Tue, 17 Jul 2007)
New Revision: 3905
Added:
trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
Removed:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ClassLoaderInjectionDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ClassLoaderInjectionDeploymentAspect.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri50/
trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/
trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/
trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire50/
trunk/integration/xfire/src/main/resources/jbossws-xfire42.sar/
trunk/integration/xfire/src/main/resources/jbossws-xfire50.deployer/
trunk/integration/xfire/src/main/resources/jbossws-xfire50.sar/
Modified:
trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
trunk/integration/native/build.xml
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
trunk/integration/native/src/main/resources/jbossws-native-config.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
trunk/integration/sunri/ant-import/build-testsuite.xml
trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
trunk/integration/sunri/build.xml
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
trunk/integration/sunri/src/test/resources/test-excludes.txt
trunk/integration/xfire/ant-import/build-testsuite.xml
trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
trunk/integration/xfire/build.xml
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java
trunk/integration/xfire/src/test/resources/test-excludes.txt
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
Log:
Bring integration sunri, xfire to new deployer architecture
Modified: trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-17
10:36:02 UTC (rev 3904)
+++ trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -48,7 +48,7 @@
</bean>
<bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookEJB21">
<property name="deploymentAspectManager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
- <property name="phaseOneInterceptors">
+ <property name="phaseTwoInterceptors">
<list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorEJB21</value>
</list>
@@ -64,18 +64,8 @@
</bean>
<bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookEJB3">
<property name="deploymentAspectManager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
- <property name="phaseOneInterceptors">
- <list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
- <value>jboss.ws:service=DeployerInterceptorEJB3</value>
- </list>
- </property>
- </bean>
- <bean name="WSMainDeployerHook"
class="org.jboss.wsf.container.jboss42.MainDeployerHook">
- <property name="deploymentAspectManager"><inject
bean="WSMainDeploymentAspectManager"/></property>
<property name="phaseTwoInterceptors">
<list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
- <value>jboss.ws:service=DeployerInterceptorJSE</value>
- <value>jboss.ws:service=DeployerInterceptorEJB21</value>
<value>jboss.ws:service=DeployerInterceptorEJB3</value>
</list>
</property>
@@ -90,18 +80,10 @@
<bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
- <bean name="WSMainDeploymentAspectManager"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
- <property name="name">WSMainDeploymentAspectManager</property>
- </bean>
<!--
The container deployment aspects
-->
- <bean name="WSClassLoaderInjectionDeploymentAspect"
class="org.jboss.wsf.container.jboss42.ClassLoaderInjectionDeploymentAspect">
- <property name="requires">AllowClassLoaderInjection</property>
- <property name="provides">ContainerClassLoader</property>
- </bean>
-
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
@@ -133,7 +115,7 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property
name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property
name="requires">EndpointName,StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
@@ -187,16 +169,22 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
<inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSClassLoaderInjectionDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ClassLoaderInjectionDeploymentAspect.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ClassLoaderInjectionDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ClassLoaderInjectionDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -1,57 +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.wsf.container.jboss42;
-
-//$Id: ClassLoaderInjectionDeployer.java 3147 2007-05-19 15:35:46Z
thomas.diesler(a)jboss.com $
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * A deployer that injects the correct classloader into the UMDM
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ClassLoaderInjectionDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- DeploymentInfo unit = dep.getContext().getAttachment(DeploymentInfo.class);
- if (unit == null)
- throw new IllegalStateException("Cannot obtain deployement unit");
-
- ClassLoader classLoader = unit.ucl;
-
- // Get the webapp context classloader and use it as the deploymet class loader
- WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- classLoader = webMetaData.getContextLoader();
- }
-
- dep.setClassLoader(classLoader);
- }
-}
\ No newline at end of file
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -55,7 +55,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
- dep.setClassLoader(unit.annotationsCl);
+ dep.setInitialClassLoader(unit.annotationsCl);
+ dep.setRuntimeClassLoader(unit.ucl);
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -61,7 +61,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
- dep.setClassLoader(unit.annotationsCl);
+ dep.setInitialClassLoader(unit.annotationsCl);
+ dep.setRuntimeClassLoader(null);
dep.setType(getDeploymentType());
Service service = dep.getService();
@@ -91,7 +92,7 @@
try
{
- ClassLoader loader = dep.getClassLoader();
+ ClassLoader loader = dep.getInitialClassLoader();
Class<?> epBean = loader.loadClass(servletClass.trim());
// If this is a servlet we defer the the bean creation
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -56,7 +56,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
- dep.setClassLoader(unit.annotationsCl);
+ dep.setInitialClassLoader(unit.annotationsCl);
+ dep.setRuntimeClassLoader(unit.ucl);
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -60,7 +60,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new URLLoaderAdapter(unit.localUrl));
- dep.setClassLoader(unit.annotationsCl);
+ dep.setInitialClassLoader(unit.annotationsCl);
+ dep.setRuntimeClassLoader(null);
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified: trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-17
10:36:02 UTC (rev 3904)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -48,7 +48,7 @@
</bean>
<bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookEJB21">
<property name="deploymentAspectManager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
- <property name="phaseOneInterceptors">
+ <property name="phaseTwoInterceptors">
<list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
<value>jboss.ws:service=DeployerInterceptorEJB21</value>
</list>
@@ -64,18 +64,8 @@
</bean>
<bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookEJB3">
<property name="deploymentAspectManager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
- <property name="phaseOneInterceptors">
- <list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
- <value>jboss.ws:service=DeployerInterceptorEJB3</value>
- </list>
- </property>
- </bean>
- <bean name="WSMainDeployerHook"
class="org.jboss.wsf.container.jboss42.MainDeployerHook">
- <property name="deploymentAspectManager"><inject
bean="WSMainDeploymentAspectManager"/></property>
<property name="phaseTwoInterceptors">
<list class="java.util.LinkedList"
elementClass="javax.management.ObjectName">
- <value>jboss.ws:service=DeployerInterceptorJSE</value>
- <value>jboss.ws:service=DeployerInterceptorEJB21</value>
<value>jboss.ws:service=DeployerInterceptorEJB3</value>
</list>
</property>
@@ -90,18 +80,10 @@
<bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
- <bean name="WSMainDeploymentAspectManager"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
- <property name="name">WSMainDeploymentAspectManager</property>
- </bean>
<!--
The container deployment aspects
-->
- <bean name="WSClassLoaderInjectionDeploymentAspect"
class="org.jboss.wsf.container.jboss42.ClassLoaderInjectionDeploymentAspect">
- <property name="requires">AllowClassLoaderInjection</property>
- <property name="provides">ContainerClassLoader</property>
- </bean>
-
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
@@ -133,12 +115,12 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property
name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property name="requires">EndpointName,
StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss42.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContextProperties,
ContainerMetaData</property>
+ <property name="requires">ContextProperties, ContainerMetaData,
StackDescriptor</property>
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
</bean>
@@ -186,16 +168,22 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
<inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSClassLoaderInjectionDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ClassLoaderInjectionDeploymentAspect.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ClassLoaderInjectionDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ClassLoaderInjectionDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -1,57 +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.wsf.container.jboss50;
-
-//$Id: ClassLoaderInjectionDeployer.java 3772 2007-07-01 19:29:13Z
thomas.diesler(a)jboss.com $
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * A deployer that injects the correct classloader into the Deployment
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ClassLoaderInjectionDeploymentAspect extends DeploymentAspect
-{
- @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 = dep.getContext().getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- classLoader = webMetaData.getContextLoader();
- }
-
- dep.setClassLoader(classLoader);
- }
-}
\ No newline at end of file
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -55,7 +55,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setClassLoader(unit.getClassLoader());
+ dep.setInitialClassLoader(unit.getClassLoader());
+ dep.setRuntimeClassLoader(unit.getClassLoader());
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -58,7 +58,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setClassLoader(unit.getClassLoader());
+ dep.setInitialClassLoader(unit.getClassLoader());
+ dep.setRuntimeClassLoader(null);
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -58,7 +58,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setClassLoader(unit.getClassLoader());
+ dep.setInitialClassLoader(unit.getClassLoader());
+ dep.setRuntimeClassLoader(unit.getClassLoader());
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -58,7 +58,8 @@
{
Deployment dep = createDeployment();
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setClassLoader(unit.getClassLoader());
+ dep.setInitialClassLoader(unit.getClassLoader());
+ dep.setRuntimeClassLoader(null);
dep.setType(getDeploymentType());
Service service = dep.getService();
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -24,13 +24,18 @@
//$Id: ModifyWebMetaDataDeployer.java 3150 2007-05-20 00:29:48Z thomas.diesler(a)jboss.com
$
import java.util.Iterator;
+import java.util.Map;
+import org.jboss.metadata.Listener;
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.ParamValue;
import org.jboss.metadata.web.Servlet;
+import org.jboss.metadata.web.ParamValue.ParamType;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
/**
* A deployer that modifies the web.xml meta data
@@ -43,11 +48,27 @@
@Override
public void create(Deployment dep)
{
- String propKey = "SERVICE_ENDPOINT_SERVLET";
+ String propKey = WebAppDesciptorModifier.SERVLET_CLASS;
String servletClass = (String)dep.getContext().getProperty(propKey);
if (servletClass == null)
throw new IllegalStateException("Cannot obtain context property: " +
propKey);
+
+ modifyServletClass(dep, servletClass);
+
+ propKey = WebAppDesciptorModifier.SERVLET_CONTEXT_LISTENER;
+ String listenerClass = (String)dep.getContext().getProperty(propKey);
+ if (listenerClass != null)
+ modifyListener(dep, listenerClass);
+ propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams != null)
+ modifyContextParams(dep, contextParams);
+ }
+
+ private void modifyServletClass(Deployment dep, String servletClass)
+ {
+
WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
if (webMetaData != null)
{
@@ -63,7 +84,7 @@
}
// Nothing to do if we have an <init-param>
- if (!isAlreadyModified(servlet) && !isJavaxServlet(orgServletClass,
dep.getClassLoader()))
+ if (!isAlreadyModified(servlet) && !isJavaxServlet(orgServletClass,
dep.getInitialClassLoader()))
{
servlet.setServletClass(servletClass);
NameValuePair initParam = new
NameValuePair(Endpoint.SEPID_DOMAIN_ENDPOINT, orgServletClass);
@@ -73,6 +94,33 @@
}
}
+ private void modifyListener(Deployment dep, String listenerClass)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ Listener listener = new Listener();
+ listener.setListenerClass(listenerClass);
+ webMetaData.addListener(listener);
+ }
+ }
+
+ private void modifyContextParams(Deployment dep, Map<String, String>
contextParams)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ ParamValue ctxParam = new ParamValue();
+ ctxParam.setType(ParamType.CONTEXT_PARAM);
+ ctxParam.setName(entry.getKey());
+ ctxParam.setValue(entry.getValue());
+ webMetaData.addContextParam(ctxParam);
+ }
+ }
+ }
+
private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
{
boolean isServlet = false;
Modified:
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -6,12 +6,11 @@
*********************************************************************************************************************
Web Service deployment
- There are three deployers registered with the JBoss Main Deployer.
+ There are two deployers registered with the JBoss Main Deployer.
The order of which is important
1) EJBDeployer < WebServiceDeployerEJB
2) WebServiceDeployerJSE < WarDeployer
- 3) WebServiceMainDeployer
Each WebServiceDeployer has a number of DeployerHooks registered with it
@@ -23,9 +22,6 @@
- WSDeployerHook_JAXRPC_JSE
- WSDeployerHook_JAXWS_JSE
- - WebServiceMainDeployer
- - WSMainDeployerHook
-
Conceptually, each of these hooks implements the following pattern:
DeployerHook.deploy(unit)
@@ -69,17 +65,6 @@
<depends>WebAppParsingDeployer</depends>
</bean>
- <!--
- A web service deployer that hooks in after the web service WAR/EJB deployers
- -->
- <bean name="WebServiceMainDeployer"
class="org.jboss.wsf.container.jboss50.WebServiceMainDeployer">
- <property name="relOrderJSE"><inject
bean="WebServiceDeployerJSE"
property="relativeOrder"/></property>
- <property name="relOrderEJB"><inject
bean="WebServiceDeployerEJB"
property="relativeOrder"/></property>
- <depends>WarDeployer</depends>
- <depends>WebServiceDeployerEJB</depends>
- <depends>WebServiceDeployerJSE</depends>
- </bean>
-
<!--
Register DeployerHooks with JBoss deployers
-->
@@ -139,20 +124,6 @@
</uninstall>
<depends>WebServiceDeployerEJB</depends>
</bean>
- <bean name="WSMainDeployerHook"
class="org.jboss.wsf.container.jboss50.MainDeployerHook">
- <property name="deploymentAspectManager"><inject
bean="WSMainDeploymentAspectManager"/></property>
- <install bean="WebServiceMainDeployer"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceMainDeployer"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceMainDeployer</depends>
- </bean>
<!--
Each DeploymentAspectManger maintains a list of DeploymentAspects
@@ -163,9 +134,6 @@
<bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
<property name="name">WSDeploymentAspectManagerEJB</property>
</bean>
- <bean name="WSMainDeploymentAspectManager"
class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
- <property name="name">WSMainDeploymentAspectManager</property>
- </bean>
<!--
The container deployment aspects
@@ -190,7 +158,7 @@
</map>
</property>
</bean>
-
+
<bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
</bean>
@@ -205,12 +173,12 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property
name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property
name="requires">EndpointName,StackEndpointHandler</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContextProperties</property>
+ <property name="requires">ContextProperties,
StackGeneratedDescriptor</property>
</bean>
<bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
@@ -249,15 +217,22 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
+ <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
- <inject bean="WSClassLoaderInjectionDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
<inject bean="WSEndpointLifecycleDeploymentAspect"/>
Modified: trunk/integration/native/build.xml
===================================================================
--- trunk/integration/native/build.xml 2007-07-17 10:36:02 UTC (rev 3904)
+++ trunk/integration/native/build.xml 2007-07-17 10:48:13 UTC (rev 3905)
@@ -209,7 +209,9 @@
<fileset dir="${native.output.lib.dir}/jbossws-native42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf
dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF"/>
+ <metainf
dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
<metainf dir="${core.dir}/src/main/resources/standard-config">
<include name="standard-*-config.xml"/>
</metainf>
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/EagerInitializeDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -42,7 +42,7 @@
if (umd == null)
throw new IllegalStateException("Cannot obtain unified meta data");
- umd.setClassLoader(dep.getClassLoader());
+ umd.setClassLoader(dep.getRuntimeClassLoader());
umd.eagerInitialize();
}
}
\ No newline at end of file
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -164,7 +164,7 @@
ServletInputStream in = req.getInputStream();
ServletOutputStream out = res.getOutputStream();
- ClassLoader classLoader = endpoint.getService().getDeployment().getClassLoader();
+ ClassLoader classLoader =
endpoint.getService().getDeployment().getInitialClassLoader();
if (classLoader == null)
throw new IllegalStateException("Deployment has no classloader
associated");
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -27,7 +27,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
import org.jboss.wsf.spi.invocation.EndpointServlet;
/**
@@ -61,5 +64,21 @@
log.debug("Updating service endpoint config\n config-name: " +
configName + "\n config-file: " + configFile);
epMetaData.setConfigName(configName, configFile);
}
+
+ Deployment dep = endpoint.getService().getDeployment();
+ if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
+ {
+ // Initialize the meta data model
+ UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+ if (umd.isEagerInitialized() == false)
+ {
+ umd.setClassLoader(dep.getRuntimeClassLoader());
+ umd.eagerInitialize();
+ }
+
+ // Start the endpoint
+ if (endpoint.getState() == EndpointState.CREATED)
+ endpoint.getLifecycleHandler().start(endpoint);
+ }
}
}
Modified: trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
--- trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-17
10:36:02 UTC (rev 3904)
+++ trunk/integration/native/src/main/resources/jbossws-native-config.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -51,13 +51,13 @@
<property name="provides">ContextProperties</property>
<property name="contextProperties">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
-
<entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
+
<entry><key>ServletClass</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
</map>
</property>
</bean>
<bean name="WSNativeEagerInitializeDeploymentAspect"
class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
- <property
name="requires">ContainerClassLoader,UnifiedMetaDataModel</property>
+ <property name="requires">UnifiedMetaDataModel</property>
<property name="provides">InitializedMetaDataModel</property>
</bean>
@@ -88,20 +88,25 @@
<bean name="WSNativeUnifiedMetaDataDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
<property name="requires">ContainerMetaData,
URLPattern</property>
- <property name="provides">UnifiedMetaDataModel,
AllowClassLoaderInjection</property>
+ <property name="provides">UnifiedMetaDataModel,
StackDescriptor</property>
</bean>
<!-- Deployment aspect installers -->
- <bean name="WSNativeJSEDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <bean name="WSNativeDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
+ <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEventingDeploymentAspect"/>
+ <inject bean="WSNativePublishContractDeploymentAspect"/>
+ <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
+ <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
</set>
</property>
</bean>
- <bean name="WSNativeMainDeploymentAspectInstaller"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject
bean="WSMainDeploymentAspectManager"/></property>
+ <bean name="WSNativeDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
@@ -114,4 +119,4 @@
</set>
</property>
</bean>
-
+
\ No newline at end of file
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeployment.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -47,7 +47,9 @@
// The state for this deployment
private DeploymentState state;
// The deployment class loader
- private ClassLoader classLoader;
+ private ClassLoader initialLoader;
+ // The runtime class loader
+ private ClassLoader runtimeLoader;
public BasicDeployment()
{
@@ -76,16 +78,26 @@
this.rootFile = rootFile;
}
- public void setClassLoader(ClassLoader classLoader)
+ public void setInitialClassLoader(ClassLoader classLoader)
{
- this.classLoader = classLoader;
+ this.initialLoader = classLoader;
}
- public ClassLoader getClassLoader()
+ public ClassLoader getInitialClassLoader()
{
- return classLoader;
+ return initialLoader;
}
+ public void setRuntimeClassLoader(ClassLoader classLoader)
+ {
+ this.runtimeLoader = classLoader;
+ }
+
+ public ClassLoader getRuntimeClassLoader()
+ {
+ return runtimeLoader;
+ }
+
public Service getService()
{
return service;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -104,7 +104,16 @@
}
if (allAspects.size() != 0)
- throw new IllegalStateException("Cannot add: " + allAspects);
+ {
+ Set<String> providedConditions = new HashSet<String>();
+ for (int i = 0; i < sortedAspects.size(); i++)
+ {
+ DeploymentAspect sortedAspect = sortedAspects.get(i);
+ providedConditions.addAll(sortedAspect.getProvidesAsSet());
+ }
+
+ throw new IllegalStateException("Cannot add: " + allAspects +
"\n provided: " + providedConditions);
+ }
for (DeploymentAspect aspect : sortedAspects)
log.info(name + ": " + aspect);
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -83,8 +83,11 @@
if (targetBean == null)
throw new IllegalStateException("Target bean not set");
- ClassLoader classLoader = service.getDeployment().getClassLoader();
+ ClassLoader classLoader = service.getDeployment().getRuntimeClassLoader();
if (classLoader == null)
+ classLoader = service.getDeployment().getInitialClassLoader();
+
+ if (classLoader == null)
throw new IllegalStateException("Deployment classloader not set");
Class beanClass;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -38,15 +38,19 @@
@Override
public void create(Deployment dep)
{
- String contextRoot = getExplicitContextRoot(dep);
+ String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null)
- contextRoot = getImplicitContextRoot(dep);
-
- // Always prefix with '/'
- if (contextRoot.startsWith("/") == false)
- contextRoot = "/" + contextRoot;
-
- dep.getService().setContextRoot(contextRoot);
+ {
+ contextRoot = getExplicitContextRoot(dep);
+ if (contextRoot == null)
+ contextRoot = getImplicitContextRoot(dep);
+
+ // Always prefix with '/'
+ if (contextRoot.startsWith("/") == false)
+ contextRoot = "/" + contextRoot;
+
+ dep.getService().setContextRoot(contextRoot);
+ }
}
protected String getExplicitContextRoot(Deployment dep)
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -54,11 +54,17 @@
void setRootFile(UnifiedVirtualFile root);
/** Get the class loader for this deployment */
- ClassLoader getClassLoader();
+ ClassLoader getInitialClassLoader();
/** Set the class loader for this deployment */
- void setClassLoader(ClassLoader loader);
+ void setInitialClassLoader(ClassLoader loader);
+ /** Get the runtime class loader for this deployment */
+ ClassLoader getRuntimeClassLoader();
+
+ /** Set the runtime class loader for this deployment */
+ void setRuntimeClassLoader(ClassLoader loader);
+
/** Get the deployment context */
DeploymentContext getContext();
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointHandlerDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -84,7 +84,7 @@
{
try
{
- Class<?> handlerClass = dep.getClassLoader().loadClass(requestHandler);
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(requestHandler);
return (RequestHandler)handlerClass.newInstance();
}
catch (Exception e)
@@ -97,7 +97,7 @@
{
try
{
- Class<?> handlerClass = dep.getClassLoader().loadClass(lifecycleHandler);
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(lifecycleHandler);
return (LifecycleHandler)handlerClass.newInstance();
}
catch (Exception e)
@@ -128,7 +128,7 @@
{
try
{
- Class<?> handlerClass = dep.getClassLoader().loadClass(className);
+ Class<?> handlerClass =
dep.getInitialClassLoader().loadClass(className);
invocationHandler = (InvocationHandler)handlerClass.newInstance();
}
catch (Exception e)
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -42,15 +42,19 @@
{
for (Endpoint ep : dep.getService().getEndpoints())
{
- String urlPattern = getExplicitPattern(dep, ep);
+ String urlPattern = ep.getURLPattern();
if (urlPattern == null)
- urlPattern = getImplicitPattern(dep, ep);
-
- // Always prefix with '/'
- if (urlPattern.startsWith("/") == false)
- urlPattern = "/" + urlPattern;
+ {
+ urlPattern = getExplicitPattern(dep, ep);
+ if (urlPattern == null)
+ urlPattern = getImplicitPattern(dep, ep);
+
+ // Always prefix with '/'
+ if (urlPattern.startsWith("/") == false)
+ urlPattern = "/" + urlPattern;
- ep.setURLPattern(urlPattern);
+ ep.setURLPattern(urlPattern);
+ }
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -35,8 +35,12 @@
*/
public interface WebAppDesciptorModifier
{
+ final String SERVLET_CONTEXT_LISTENER = "ServletContextListener";
+ final String CONTEXT_PARAMETER_MAP = "ContextParameterMap";
+ final String SERVLET_CLASS = "ServletClass";
+
// The results of the URL rewriting
- public class RewriteResults
+ class RewriteResults
{
// The URL to the rewrittn web.xml
public URL webXML;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -22,6 +22,7 @@
package org.jboss.wsf.spi.deployment;
import java.util.Iterator;
+import java.util.Map;
import org.dom4j.Document;
import org.dom4j.Element;
@@ -40,14 +41,34 @@
public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws
ClassNotFoundException
{
- String propKey = "SERVICE_ENDPOINT_SERVLET";
+ RewriteResults results = new RewriteResults();
+ Element root = webXml.getRootElement();
+
+ String propKey = SERVLET_CLASS;
String servletClass = (String)dep.getContext().getProperty(propKey);
if (servletClass == null)
throw new IllegalStateException("Cannot obtain context property: " +
propKey);
- RewriteResults results = new RewriteResults();
-
- Element root = webXml.getRootElement();
+ propKey = CONTEXT_PARAMETER_MAP;
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams != null)
+ {
+ for (Map.Entry<String, String> entry : contextParams.entrySet())
+ {
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(entry.getKey());
+ contextParam.addElement("param-value").addText(entry.getValue());
+ }
+ }
+
+ propKey = SERVLET_CONTEXT_LISTENER;
+ String listenerClass = (String)dep.getContext().getProperty(propKey);
+ if (listenerClass != null)
+ {
+ Element listener = root.addElement("listener");
+ listener.addElement("listener-class").setText(listenerClass);
+ }
+
for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
{
Element servlet = (Element)it.next();
@@ -66,7 +87,7 @@
Class orgServletClass = null;
try
{
- ClassLoader loader = dep.getClassLoader();
+ ClassLoader loader = dep.getInitialClassLoader();
orgServletClass = loader.loadClass(orgServletClassName);
}
catch (ClassNotFoundException ex)
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -33,8 +33,10 @@
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.WebServiceException;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -102,5 +104,13 @@
+ Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
}
+
+ // Set the runtime classloader for JSE endpoints, this should be the tomcat
classloader
+ Deployment dep = endpoint.getService().getDeployment();
+ if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() ==
DeploymentType.JAXWS_JSE)
+ {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ dep.setRuntimeClassLoader(classLoader);
+ }
}
}
Modified: trunk/integration/sunri/ant-import/build-testsuite.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-testsuite.xml 2007-07-17 10:36:02 UTC (rev
3904)
+++ trunk/integration/sunri/ant-import/build-testsuite.xml 2007-07-17 10:48:13 UTC (rev
3905)
@@ -18,6 +18,9 @@
<property name="tests.resources.dir"
value="${tests.dir}/resources"/>
<!-- Define excludesfile -->
+ <condition property="excludesfile"
value="${int.sunri.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt">
+ <available
file="${int.sunri.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt"/>
+ </condition>
<property name="excludesfile"
value="${int.sunri.dir}/src/test/resources/test-excludes.txt"/>
<!-- ================================================================== -->
Modified: trunk/integration/sunri/ant-import/macros-deploy-sunri.xml
===================================================================
--- trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-07-17 10:36:02 UTC
(rev 3904)
+++ trunk/integration/sunri/ant-import/macros-deploy-sunri.xml 2007-07-17 10:48:13 UTC
(rev 3905)
@@ -53,6 +53,11 @@
<fileset dir="@{jbosslibs}">
<include name="jbossws-jboss50.jar"/>
</fileset>
+ <fileset dir="@{thirdpartylibs}">
+ <include name="jaxws-api.jar"/>
+ <include name="jsr181-api.jar"/>
+ <include name="saaj-api.jar"/>
+ </fileset>
</copy>
<!-- BOOTSTRAP JARS -->
@@ -64,7 +69,7 @@
</copy>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
- <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){stacklibs}/jbossws-sunri50-deployer.zip"/>
+ <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){jbosslibs}/jbossws-jboss50-deployer.zip"/>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<unjar
dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"
src="(a){stacklibs}/jbossws-sunri50.sar"/>
<copy
tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"
file="(a){stacklibs}/jbossws-context.war" overwrite="true"/>
@@ -100,8 +105,12 @@
<!-- SERVER JARS -->
<fileset dir="${jboss50.home}/server/${jboss.server.instance}/lib">
<include name="jbossws-jboss50.jar"/>
+ <include name="jaxws-api.jar"/>
+ <include name="jsr181-api.jar"/>
+ <include name="saaj-api.jar"/>
</fileset>
</delete>
+
<delete
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<!-- Undeploy juddi-service.sar -->
<delete
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml 2007-07-17 10:36:02 UTC (rev 3904)
+++ trunk/integration/sunri/build.xml 2007-07-17 10:48:13 UTC (rev 3905)
@@ -59,7 +59,7 @@
<target name="compile"
depends="init,compile-classes,compile-etc" description="Compile all source
files."/>
<!-- Compile java sources -->
- <target name="compile-classes"
depends="compile-classes-sunri,compile-classes-sunri50"/>
+ <target name="compile-classes"
depends="compile-classes-sunri"/>
<target name="compile-classes-sunri" depends="init">
<mkdir dir="${sunri.output.classes.dir}"/>
<javac srcdir="${sunri.java.dir}" sourcepath=""
destdir="${sunri.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
@@ -68,15 +68,6 @@
<classpath refid="sunri.integration.classpath"/>
</javac>
</target>
- <target name="compile-classes-sunri50" depends="init"
if="jboss50.home">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
- <mkdir dir="${sunri.output.classes.dir}"/>
- <javac srcdir="${sunri.java.dir}" sourcepath=""
destdir="${sunri.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
- <include name="org/jboss/wsf/stack/sunri50/**"/>
- <classpath refid="sunri50.integration.classpath"/>
- </javac>
- </target>
<!-- Compile etc files (manifests and such) -->
<target name="compile-etc" depends="init">
@@ -116,7 +107,6 @@
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri.jar"
manifest="${sunri.output.etc.dir}/default.mf">
<fileset dir="${sunri.output.classes.dir}">
<exclude name="org/jboss/wsf/stack/sunri/sunri/tools/**"/>
- <include name="org/jboss/wsf/stack/sunri50/**"/>
<include name="org/jboss/wsf/stack/sunri/injection/**"/>
<include name="org/jboss/wsf/stack/sunri/client/**"/>
<include name="org/jboss/wsf/stack/sunri/metadata/**"/>
@@ -153,11 +143,22 @@
<target name="jars-jboss50" depends="jars-common"
if="jboss50.home">
+ <!-- Concat jbossws-beans.xml -->
+ <concat
destfile="${sunri.output.lib.dir}/jbossws-sunri50/jbossws-beans.xml">
+ <header trimleading="yes">
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ </header>
+ <fileset file="${sunri.resources.dir}/jbossws-sunri-config.xml"/>
+ <footer trimleading="yes">
+ </deployment>
+ </footer>
+ </concat>
+
<!-- Build jbossws-sunri50.sar -->
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri50.sar"
manifest="${sunri.output.etc.dir}/default.mf">
- <!-- [JBAS-4379] MC beans deployed twice because of jacc service
+ <!--
<fileset dir="${sunri.output.lib.dir}">
- <include name="jbossws-context.war"/>
+ <include name="jbossws-context.war"/>
</fileset>
-->
<fileset dir="${spi.dir}/thirdparty">
@@ -179,29 +180,31 @@
<include name="stax-ex.jar"/>
<include name="streambuffer.jar"/>
</fileset>
- <metainf
dir="${sunri.resources.dir}/jbossws-sunri50.sar/META-INF">
+ <fileset dir="${sunri.output.lib.dir}">
+ <include name="jbossws-sunri.jar"/>
+ </fileset>
+ <metainf dir="${sunri.output.lib.dir}/jbossws-sunri50">
<include name="jbossws-beans.xml"/>
</metainf>
</jar>
-
- <!-- Build jbossws-sunri50-deployer -->
- <zip zipfile="${sunri.output.lib.dir}/jbossws-sunri50-deployer.zip">
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- </fileset>
- <fileset dir="${sunri.output.lib.dir}">
- <include name="jbossws-sunri.jar"/>
- </fileset>
- <fileset dir="${sunri.resources.dir}/jbossws-sunri50.deployer">
- <include name="META-INF/jbossws-deployer-beans.xml"/>
- </fileset>
- </zip>
- </target>
+ </target>
<target name="jars-jboss42" depends="jars-common"
if="jboss42.home">
<ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+ <!-- Concat jboss-beans.xml -->
+ <concat
destfile="${sunri.output.lib.dir}/jbossws-sunri42/jbossws.beans/META-INF/jboss-beans.xml">
+ <header trimleading="yes">
+ <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">
+ </header>
+ <fileset file="${sunri.resources.dir}/jbossws-sunri-config.xml"/>
+ <fileset
file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+ <footer trimleading="yes">
+ </deployment>
+ </footer>
+ </concat>
+
<!-- Build jbossws-sunri42.sar -->
<jar jarfile="${sunri.output.lib.dir}/jbossws-sunri42.sar"
manifest="${sunri.output.etc.dir}/default.mf">
<fileset dir="${sunri.output.lib.dir}">
@@ -234,10 +237,10 @@
<include name="stax-ex.jar"/>
<include name="streambuffer.jar"/>
</fileset>
- <fileset dir="${sunri.resources.dir}/jbossws-sunri42.sar">
+ <fileset dir="${sunri.output.lib.dir}/jbossws-sunri42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf
dir="${sunri.resources.dir}/jbossws-sunri42.sar/META-INF">
+ <metainf
dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
<include name="jboss-service.xml"/>
</metainf>
</jar>
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -23,12 +23,16 @@
//$Id: SunJaxwsDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
+import java.util.HashMap;
+import java.util.Map;
+
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoint;
import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
@@ -43,29 +47,44 @@
@Override
public void create(Deployment dep)
{
- DDEndpoints dd = new DDEndpoints();
- for (Endpoint ep : dep.getService().getEndpoints())
+
+ DDEndpoints dd = dep.getContext().getAttachment(DDEndpoints.class);
+ if (dd == null)
{
- String epName = ep.getShortName();
- String targetBean = ep.getTargetBeanName();
- String urlPattern = ep.getURLPattern();
+ dd = new DDEndpoints();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String epName = ep.getShortName();
+ String targetBean = ep.getTargetBeanName();
+ String urlPattern = ep.getURLPattern();
- DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+ DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+
+ Class beanClass = ep.getTargetBeanClass();
+ BindingType anBindingType =
(BindingType)beanClass.getAnnotation(BindingType.class);
+ if (anBindingType != null && anBindingType.value().length() > 0)
+ {
+ String binding = anBindingType.value();
+ ddep.setBinding(binding);
+ if (binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))
+ ddep.setEnableMTOM(true);
+ }
+
+ log.info("Add " + ddep);
+ dd.addEndpoint(ddep);
+ }
- Class beanClass = ep.getTargetBeanClass();
- BindingType anBindingType =
(BindingType)beanClass.getAnnotation(BindingType.class);
- if (anBindingType != null && anBindingType.value().length() > 0)
+ dep.getContext().addAttachment(DDEndpoints.class, dd);
+
+ String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams == null)
{
- String binding = anBindingType.value();
- ddep.setBinding(binding);
- if (binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))
- ddep.setEnableMTOM(true);
+ contextParams = new HashMap<String, String>();
+ dep.getContext().setProperty(propKey, contextParams);
}
-
- log.info("Add " + ddep);
- dd.addEndpoint(ddep);
+ contextParams.put(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL,
dd.createFileURL().toExternalForm());
}
- dep.getContext().addAttachment(DDEndpoints.class, dd);
}
@Override
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -70,19 +70,6 @@
{
}
- public void contextDestroyed(ServletContextEvent event)
- {
- if (delegate != null)
- { // the deployment might have failed.
- delegate.destroy();
- }
-
- if (logger.isLoggable(Level.INFO))
- {
- logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
- }
- }
-
public void contextInitialized(ServletContextEvent event)
{
if (logger.isLoggable(Level.INFO))
@@ -120,6 +107,19 @@
}
}
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (delegate != null)
+ { // the deployment might have failed.
+ delegate.destroy();
+ }
+
+ if (logger.isLoggable(Level.INFO))
+ {
+ logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
+ }
+ }
+
/**
* Externalized for integration
*/
Modified:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -98,7 +98,7 @@
Class orgServletClass = null;
try
{
- ClassLoader loader = dep.getClassLoader();
+ ClassLoader loader = dep.getInitialClassLoader();
orgServletClass = loader.loadClass(orgServletClassName);
}
catch (ClassNotFoundException ex)
Copied: trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml (from rev
3904,
branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml)
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
(rev 0)
+++ trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -0,0 +1,108 @@
+
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <!--
+ 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 'modifySOAPAddress' 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 not set, JBossWS uses requesters protocol host and
port when rewriting the <soap:address>.
+ -->
+ <property
name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting
the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed
connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry"
class="org.jboss.wsf.stack.sunri.ManagedEndpointRegistry"/>
+
+ <!-- Bind Service objects in client environment context -->
+ <bean name="WSServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
+ <property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
+ </bean>
+
+ <!-- JBoss_4_2_0_GA uses this hardcoded bean name -->
+ <bean name="ServiceRefHandler"
class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
+ <property name="jaxrpcBinder"><inject
bean="WSServiceRefBinderJAXRPC"/></property>
+ <property name="jaxwsBinder"><inject
bean="WSServiceRefBinderJAXWS"/></property>
+ </bean>
+ <bean name="WSServiceRefBinderJAXRPC"
class="org.jboss.wsf.stack.sunri.client.DummyServiceRefBinderJAXRPC"/>
+ <bean name="WSServiceRefBinderJAXWS"
class="org.jboss.wsf.stack.sunri.client.ServiceRefBinderJAXWS"/>
+
+ <!-- Logging redirector -->
+ <bean name="JDKLogRedirector"
class="org.jboss.wsf.stack.sunri.log.JDKLogRedirector">
+ <property name="namespaces">
+ <list class="java.util.LinkedList"
elementClass="java.lang.String">
+ <value>javax.enterprise.resource.webservices.jaxws</value>
+ <value>com.sun</value>
+ </list>
+ </property>
+ <property name="levelMapping">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>INFO</key><value>info</value></entry>
+
<entry><key>SEVERE</key><value>error</value></entry>
+
<entry><key>WARNING</key><value>warn</value></entry>
+
<entry><key>FINE</key><value>debug</value></entry>
+
<entry><key>FINER</key><value>trace</value></entry>
+
<entry><key>FINEST</key><value>trace</value></entry>
+ </map>
+ </property>
+ <property name="defaultLevel">debug</property>
+ </bean>
+
+ <!--
+ The stack specific deployment aspects
+ -->
+ <bean name="WSMetroContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <property name="provides">ContextProperties</property>
+ <property name="contextProperties">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>ServletClass</key><value>org.jboss.wsf.spi.invocation.EndpointServlet</value></entry>
+
<entry><key>ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
+ </map>
+ </property>
+ </bean>
+
+ <bean name="WSMetroEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerEndpointHandler</property>
+ <property name="provides">StackEndpointHandler</property>
+ <property
name="requestHandler">org.jboss.wsf.stack.sunri.RequestHandlerImpl</property>
+ <property
name="lifecycleHandler">org.jboss.wsf.stack.sunri.LifecycleHandlerImpl</property>
+ </bean>
+
+ <bean name="WSMetroDescriptorDeploymentAspect"
class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">StackDescriptor</property>
+ </bean>
+
+ <!-- Deployment aspect installers -->
+ <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
+ <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSMetroDescriptorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+ <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
+ <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSMetroDescriptorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
Modified: trunk/integration/sunri/src/test/resources/test-excludes.txt
===================================================================
--- trunk/integration/sunri/src/test/resources/test-excludes.txt 2007-07-17 10:36:02 UTC
(rev 3904)
+++ trunk/integration/sunri/src/test/resources/test-excludes.txt 2007-07-17 10:48:13 UTC
(rev 3905)
@@ -11,11 +11,5 @@
#
###################################################################
-# [JBWS-1669] Fix WebServiceContext.getMessageContext()
-#org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
-
# [JBWS-1673] Fix JAXR samples for SunRI
org/jboss/test/ws/jaxws/samples/jaxr/**
-
-# [JBWS-1674] Fix @WebServiceRef with SunRI
-#org/jboss/test/ws/jaxws/samples/retail/**
Modified: trunk/integration/xfire/ant-import/build-testsuite.xml
===================================================================
--- trunk/integration/xfire/ant-import/build-testsuite.xml 2007-07-17 10:36:02 UTC (rev
3904)
+++ trunk/integration/xfire/ant-import/build-testsuite.xml 2007-07-17 10:48:13 UTC (rev
3905)
@@ -18,6 +18,9 @@
<property name="tests.resources.dir"
value="${tests.dir}/resources"/>
<!-- Define excludesfile -->
+ <condition property="excludesfile"
value="${int.xfire.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt">
+ <available
file="${int.xfire.dir}/src/test/resources/test-excludes-${jbossws.integration.target}.txt"/>
+ </condition>
<property name="excludesfile"
value="${int.xfire.dir}/src/test/resources/test-excludes.txt"/>
<!-- ================================================================== -->
Modified: trunk/integration/xfire/ant-import/macros-deploy-xfire.xml
===================================================================
--- trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-07-17 10:36:02 UTC
(rev 3904)
+++ trunk/integration/xfire/ant-import/macros-deploy-xfire.xml 2007-07-17 10:48:13 UTC
(rev 3905)
@@ -50,7 +50,7 @@
</fileset>
</copy>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
- <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){stacklibs}/jbossws-xfire50-deployer.zip"/>
+ <unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"
src="(a){jbosslibs}/jbossws-jboss50-deployer.zip"/>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
<unjar
dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"
src="(a){stacklibs}/jbossws-xfire50.sar"/>
<copy
tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war"
file="(a){stacklibs}/jbossws-context.war" overwrite="true"/>
Modified: trunk/integration/xfire/build.xml
===================================================================
--- trunk/integration/xfire/build.xml 2007-07-17 10:36:02 UTC (rev 3904)
+++ trunk/integration/xfire/build.xml 2007-07-17 10:48:13 UTC (rev 3905)
@@ -59,7 +59,7 @@
<target name="compile"
depends="init,compile-classes,compile-etc" description="Compile all source
files."/>
<!-- Compile java sources -->
- <target name="compile-classes"
depends="compile-classes-xfire,compile-classes-xfire50"/>
+ <target name="compile-classes"
depends="compile-classes-xfire"/>
<target name="compile-classes-xfire" depends="init">
<mkdir dir="${xfire.output.classes.dir}"/>
<javac srcdir="${xfire.java.dir}" sourcepath=""
destdir="${xfire.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
@@ -68,15 +68,6 @@
<classpath refid="xfire.integration.classpath"/>
</javac>
</target>
- <target name="compile-classes-xfire50" depends="init"
if="jboss50.home">
- <ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
- <mkdir dir="${xfire.output.classes.dir}"/>
- <javac srcdir="${xfire.java.dir}" sourcepath=""
destdir="${xfire.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
- <include name="org/jboss/wsf/stack/xfire50/**"/>
- <classpath refid="xfire50.integration.classpath"/>
- </javac>
- </target>
<!-- Compile etc files (manifests and such) -->
<target name="compile-etc" depends="init">
@@ -115,7 +106,6 @@
<mkdir dir="${xfire.output.lib.dir}"/>
<jar jarfile="${xfire.output.lib.dir}/jbossws-xfire.jar"
manifest="${xfire.output.etc.dir}/default.mf">
<fileset dir="${xfire.output.classes.dir}">
- <include name="org/jboss/wsf/stack/xfire50/**"/>
<include name="org/jboss/wsf/stack/xfire/**"/>
</fileset>
</jar>
@@ -141,6 +131,17 @@
<ant antfile="${int.jboss50.dir}/build.xml" target="jars"
inheritall="false"/>
+ <!-- Concat jbossws-beans.xml -->
+ <concat
destfile="${sunri.output.lib.dir}/jbossws-xfire50/jbossws-beans.xml">
+ <header trimleading="yes">
+ <deployment xmlns="urn:jboss:bean-deployer:2.0">
+ </header>
+ <fileset file="${xfire.resources.dir}/jbossws-xfire-config.xml"/>
+ <footer trimleading="yes">
+ </deployment>
+ </footer>
+ </concat>
+
<!-- Build jbosswsri.sar -->
<jar jarfile="${xfire.output.lib.dir}/jbossws-xfire50.sar"
manifest="${xfire.output.etc.dir}/default.mf">
<!-- [JBAS-4379] MC beans deployed twice because of jacc service
@@ -163,29 +164,32 @@
<include name="xfire-all.jar"/>
<include name="xfire-jsr181-api.jar"/>
</fileset>
- <metainf
dir="${xfire.resources.dir}/jbossws-xfire50.sar/META-INF">
+ <fileset dir="${xfire.output.lib.dir}">
+ <include name="jbossws-xfire.jar"/>
+ </fileset>
+ <metainf dir="${xfire.output.lib.dir}/jbossws-xfire50">
<include name="jbossws-beans.xml"/>
</metainf>
</jar>
- <!-- Build jbossws-xfire50-deployer -->
- <zip zipfile="${xfire.output.lib.dir}/jbossws-xfire50-deployer.zip">
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- </fileset>
- <fileset dir="${xfire.output.lib.dir}">
- <include name="jbossws-xfire.jar"/>
- </fileset>
- <fileset dir="${xfire.resources.dir}/jbossws-xfire50.deployer">
- <include name="META-INF/jbossws-deployer-beans.xml"/>
- </fileset>
- </zip>
</target>
<target name="jars-jboss42" depends="jars-common"
if="jboss42.home">
<ant antfile="${int.jboss42.dir}/build.xml" target="jars"
inheritall="false"/>
+ <!-- Concat jboss-beans.xml -->
+ <concat
destfile="${xfire.output.lib.dir}/jbossws-xfire42/jbossws.beans/META-INF/jboss-beans.xml">
+ <header trimleading="yes">
+ <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">
+ </header>
+ <fileset file="${xfire.resources.dir}/jbossws-xfire-config.xml"/>
+ <fileset
file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+ <footer trimleading="yes">
+ </deployment>
+ </footer>
+ </concat>
+
<!-- Build jbossws-xfire42.sar -->
<jar jarfile="${xfire.output.lib.dir}/jbossws-xfire42.sar"
manifest="${xfire.output.etc.dir}/default.mf">
<fileset dir="${xfire.output.lib.dir}">
@@ -216,10 +220,10 @@
<include name="xfire-all.jar"/>
<include name="xfire-jsr181-api.jar"/>
</fileset>
- <fileset dir="${xfire.resources.dir}/jbossws-xfire42.sar">
+ <fileset dir="${xfire.output.lib.dir}/jbossws-xfire42">
<include name="jbossws.beans/**"/>
</fileset>
- <metainf
dir="${xfire.resources.dir}/jbossws-xfire42.sar/META-INF">
+ <metainf
dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
<include name="jboss-service.xml"/>
</metainf>
</jar>
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java
===================================================================
---
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/WebAppDesciptorModifierImpl.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -85,7 +85,7 @@
Class orgServletClass = null;
try
{
- ClassLoader loader = dep.getClassLoader();
+ ClassLoader loader = dep.getInitialClassLoader();
orgServletClass = loader.loadClass(orgServletClassName);
}
catch (ClassNotFoundException ex)
Modified:
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java
===================================================================
---
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -23,10 +23,14 @@
//$Id: XFireServicesDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler(a)jboss.com $
+import java.util.HashMap;
+import java.util.Map;
+
import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.stack.xfire.metadata.services.DDBean;
import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
@@ -96,6 +100,15 @@
dd.addService(ddser);
}
dep.getContext().addAttachment(DDBeans.class, dd);
+
+ String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+ Map<String, String> contextParams = (Map<String,
String>)dep.getContext().getProperty(propKey);
+ if (contextParams == null)
+ {
+ contextParams = new HashMap<String, String>();
+ dep.getContext().setProperty(propKey, contextParams);
+ }
+ contextParams.put(XFireConfigurableServletExt.PARAM_XFIRE_SERVICES_URL,
dd.createFileURL().toExternalForm());
}
Copied: trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml (from rev
3904,
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml)
===================================================================
--- trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
(rev 0)
+++ trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml 2007-07-17
10:48:13 UTC (rev 3905)
@@ -0,0 +1,76 @@
+
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig"
class="org.jboss.wsf.spi.management.BasicServerConfig">
+ <!--
+ 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 'modifySOAPAddress' 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 not set, JBossWS uses requesters protocol host and
port when rewriting the <soap:address>.
+ -->
+ <property
name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting
the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed
connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
+ <!-- The registry for web service endpoints -->
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry"
class="org.jboss.wsf.stack.xfire.ManagedEndpointRegistry"/>
+
+ <!--
+ The stack specific deployment aspects
+ -->
+ <bean name="WSXFireContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <property name="provides">ContextProperties</property>
+ <property name="contextProperties">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>ServletClass</key><value>org.jboss.wsf.stack.xfire.XFireConfigurableServletExt</value></entry>
+ </map>
+ </property>
+ </bean>
+
+ <bean name="WSXFireEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerEndpointHandler</property>
+ <property name="provides">StackEndpointHandler</property>
+ <property
name="requestHandler">org.jboss.wsf.stack.xfire.RequestHandlerImpl</property>
+ <property
name="lifecycleHandler">org.jboss.wsf.stack.xfire.LifecycleHandlerImpl</property>
+ </bean>
+
+ <bean name="WSXFireServicesDeploymentAspect"
class="org.jboss.wsf.stack.xfire.XFireServicesDeploymentAspect">
+ <property name="provides">StackDescriptor</property>
+ <property
name="serviceFactory">org.codehaus.xfire.jaxws.JAXWSServiceFactory</property>
+ <property
name="invokerEJB3">org.jboss.wsf.stack.xfire.InvokerEJB3</property>
+ <property
name="invokerJSE">org.jboss.wsf.stack.xfire.InvokerJSE</property>
+ </bean>
+
+ <!-- Deployment aspect installers -->
+ <bean name="WSMetroDeploymentAspectInstallerJSE"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSXFireContextPropertiesDeploymentAspect"/>
+ <inject bean="WSXFireEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSXFireServicesDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+ <bean name="WSMetroDeploymentAspectInstallerEJB"
class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSXFireContextPropertiesDeploymentAspect"/>
+ <inject bean="WSXFireEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSXFireServicesDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
Modified: trunk/integration/xfire/src/test/resources/test-excludes.txt
===================================================================
--- trunk/integration/xfire/src/test/resources/test-excludes.txt 2007-07-17 10:36:02 UTC
(rev 3904)
+++ trunk/integration/xfire/src/test/resources/test-excludes.txt 2007-07-17 10:48:13 UTC
(rev 3905)
@@ -36,6 +36,7 @@
# [JBWS-1684] Fix @WebServiceRef with XFire
org/jboss/test/ws/jaxws/samples/retail/**
+org/jboss/test/ws/jaxws/samples/serviceref/**
org/jboss/test/ws/jaxws/samples/webserviceref/**
# [JBWS-1689] Add support for SwaRef
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -257,9 +257,9 @@
TypeMapping typeMapping = serContext.getTypeMapping();
OperationMetaData opMetaData = msgContext.getOperationMetaData();
- if (opMetaData != null && opMetaData.getFault(javaType) != null)
+ if (opMetaData != null && opMetaData.getFaultMetaData(javaType) !=
null)
{
- FaultMetaData faultMetaData = opMetaData.getFault(javaType);
+ FaultMetaData faultMetaData = opMetaData.getFaultMetaData(javaType);
QName xmlName = faultMetaData.getXmlName();
QName xmlType = faultMetaData.getXmlType();
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -259,9 +259,9 @@
OperationMetaData opMetaData = msgContext.getOperationMetaData();
Class<? extends Exception> exClass = ex.getClass();
- if (opMetaData != null && opMetaData.getFault(exClass) != null)
+ if (opMetaData != null && opMetaData.getFaultMetaData(exClass) != null)
{
- FaultMetaData faultMetaData = opMetaData.getFault(exClass);
+ FaultMetaData faultMetaData = opMetaData.getFaultMetaData(exClass);
Object faultBean = faultMetaData.toFaultBean(ex);
Detail detail = soapFault.addDetail();
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -375,7 +375,7 @@
return faultMetaData;
}
- public FaultMetaData getFault(Class javaType)
+ public FaultMetaData getFaultMetaData(Class javaType)
{
FaultMetaData faultMetaData = null;
for (FaultMetaData aux : faults)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -181,12 +181,11 @@
* allows for concurrent read-only access to a
<code>UnifiedMetaData</code>
* instance. This method, however, must be called from a single thread.
*/
- public void eagerInitialize()
+ public synchronized void eagerInitialize()
{
if (eagerInitialized == false)
{
- if (log.isDebugEnabled())
- log.debug("Eagerly initialize the meta data model");
+ log.debug("Eagerly initialize the meta data model");
for (ServiceMetaData service : services)
{
service.eagerInitialize();
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -21,18 +21,20 @@
*/
package org.jboss.test.ws.jaxws.samples.serviceref;
-import junit.framework.Test;
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
/**
* Test the JAXWS <service-ref>
*
@@ -45,7 +47,11 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefClientTestCase.class,
"jaxws-serviceref.war, jaxws-serviceref-client.jar");
+ String archives = "jaxws-serviceref.war";
+ if (new JBossWSTestHelper().isTargetJBoss50())
+ archives += ",jaxws-serviceref-client.jar";
+
+ return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
}
public void testWSDLAccess() throws Exception
@@ -58,6 +64,9 @@
public void testDynamicProxy() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
URL wsdlURL = new
File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
QName qname = new
QName("http://serviceref.samples.jaxws.ws.test.jboss.org/",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
@@ -70,15 +79,17 @@
public void testApplicationClient() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
InitialContext iniCtx = getInitialContext("jbossws-client");
Service service = (Service) iniCtx.lookup("java:comp/env/service2");
TestEndpoint port = service.getPort(TestEndpoint.class);
assertNotNull(port);
- BindingProvider bp = (BindingProvider)port;
-
System.out.println("FIXME [JBWS-1736]: MTOM property at service-ref
level");
+ //BindingProvider bp = (BindingProvider)port;
//boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
//assertTrue("MTOM should be enabled on port", mtomEnabled);
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -23,6 +23,7 @@
import junit.framework.Test;
import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
import javax.naming.InitialContext;
@@ -44,7 +45,11 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefEJBTestCase.class,
"jaxws-serviceref.war, jaxws-serviceref-ejb-client.jar");
+ String archives = "jaxws-serviceref.war";
+ if (new JBossWSTestHelper().isTargetJBoss50())
+ archives += ",jaxws-serviceref-ejb-client.jar";
+
+ return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
}
public void testWSDLAccess() throws Exception
@@ -58,6 +63,9 @@
public void testDynamicProxy() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
URL wsdlURL = new
File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
QName qname = new
QName("http://serviceref.samples.jaxws.ws.test.jboss.org/",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
@@ -71,6 +79,9 @@
public void testEJBClient() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
InitialContext iniCtx = getInitialContext();
EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java 2007-07-17
10:36:02 UTC (rev 3904)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java 2007-07-17
10:48:13 UTC (rev 3905)
@@ -23,6 +23,7 @@
import junit.framework.Test;
import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
import javax.xml.namespace.QName;
@@ -45,7 +46,11 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefServletTestCase.class,
"jaxws-serviceref.war, jaxws-serviceref-servlet-client.war");
+ String archives = "jaxws-serviceref.war";
+ if (new JBossWSTestHelper().isTargetJBoss50())
+ archives += ",jaxws-serviceref-servlet-client.war";
+
+ return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
}
public void testWSDLAccess() throws Exception
@@ -58,6 +63,9 @@
public void testDynamicProxy() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
URL wsdlURL = new
File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
QName qname = new
QName("http://serviceref.samples.jaxws.ws.test.jboss.org/",
"TestEndpointService");
Service service = Service.create(wsdlURL, qname);
@@ -70,6 +78,9 @@
public void testServletClient() throws Exception
{
+ if (isTargetJBoss50() == false)
+ return;
+
URL url = new URL(TARGET_ENDPOINT_ADDRESS +
"-servlet-client?echo=HelloWorld");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String retStr = br.readLine();