JBossWS SVN: r3862 - branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-12 11:33:22 -0400 (Thu, 12 Jul 2007)
New Revision: 3862
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Log:
Use aspect installer
Modified: branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-12 15:33:17 UTC (rev 3861)
+++ branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-12 15:33:22 UTC (rev 3862)
@@ -173,21 +173,11 @@
<bean name="WSClassLoaderInjectionDeploymentAspect" class="org.jboss.wsf.container.jboss50.ClassLoaderInjectionDeploymentAspect">
<property name="requires">AllowClassLoaderInjection</property>
<property name="provides">ContainerClassLoader</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSContextRootDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointHandlerDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
@@ -199,88 +189,43 @@
<entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB3</value></entry>
</map>
</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
<property name="requires">LAST_DEPLOYMENT_ASPECT</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointMetricsDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointMetricsDeploymentAspect">
<property name="endpointMetrics"><inject bean="WSEndpointMetrics"/></property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointNameDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
<property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
<property name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
<property name="provides">RegisteredEndpoint</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
<property name="requires">ContextProperties</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSUnifiedDeploymentInfoDeploymentAspect" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
<property name="provides">ContainerMetaData</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot, ContainerMetaData</property>
<property name="provides">URLPattern</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebAppDeploymentAspect">
<property name="requires">WebMetaData, ContextProperties</property>
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
@@ -288,11 +233,6 @@
<property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
<property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<!-- Deployment aspect helper beans -->
@@ -304,4 +244,32 @@
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
+ <!-- Deployment aspect installers -->
+ <bean name="WSDeploymentAspectInstallerJSE" 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="WSModifyWebMetaDataDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+ <bean name="WSMainDeploymentAspectInstaller" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSMainDeploymentAspectManager"/></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"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
+ <inject bean="WSWebAppDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
</deployment>
17 years, 5 months
JBossWS SVN: r3861 - branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-12 11:33:17 -0400 (Thu, 12 Jul 2007)
New Revision: 3861
Modified:
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
Log:
Use aspect installer
Modified: branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-12 15:33:12 UTC (rev 3860)
+++ branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-12 15:33:17 UTC (rev 3861)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
+<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">
<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig" class="org.jboss.wsf.spi.management.BasicServerConfig">
@@ -46,26 +46,11 @@
<entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
</map>
</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativeEagerInitializeDeploymentAspect" class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
<property name="requires">ContainerClassLoader,UnifiedMetaDataModel</property>
<property name="provides">InitializedMetaDataModel</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativeEndpointHandlerDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
@@ -78,49 +63,48 @@
<entry><key>JAXRPC_JSE</key><value>org.jboss.wsf.stack.jbws.ServiceLifecycleInvocationHandler</value></entry>
</map>
</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativeEventingDeploymentAspect" class="org.jboss.wsf.stack.jbws.EventingDeploymentAspect">
<property name="requires">UnifiedMetaDataModel</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativePublishContractDeploymentAspect" class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
<property name="requires">UnifiedMetaDataModel</property>
<property name="provides">PublishedContract</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativeServiceEndpointInvokerDeploymentAspect" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect">
<property name="requires">UnifiedMetaDataModel</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
<property name="requires">ContainerMetaData, URLPattern</property>
<property name="provides">UnifiedMetaDataModel, AllowClassLoaderInjection</property>
- <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
+ <!-- Deployment aspect installers -->
+ <bean name="WSNativeMainDeploymentAspectInstaller" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSMainDeploymentAspectManager"/></property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSNativeContextPropertiesDeploymentAspect"/>
+ <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
+ <inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEventingDeploymentAspect"/>
+ <inject bean="WSNativePublishContractDeploymentAspect"/>
+ <inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
+ <inject bean="WSNativeUnifiedMetaDataDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+ <bean name="WSNativeJSEDeploymentAspectInstaller" 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"/>
+ </set>
+ </property>
+ </bean>
+
</deployment>
17 years, 5 months
JBossWS SVN: r3860 - branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-12 11:33:12 -0400 (Thu, 12 Jul 2007)
New Revision: 3860
Added:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java
Log:
Use aspect installer
Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java 2007-07-12 14:28:23 UTC (rev 3859)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java 2007-07-12 15:33:12 UTC (rev 3860)
@@ -27,7 +27,11 @@
import java.util.Set;
import java.util.StringTokenizer;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.logging.Logger;
+import org.jboss.ws.integration.KernelLocator;
/**
* A deployment aspect that does nothing.
@@ -42,7 +46,7 @@
{
// provide logging
protected final Logger log = Logger.getLogger(getClass());
-
+
private String provides;
private String requires;
@@ -81,7 +85,7 @@
public void stop(Deployment dep)
{
}
-
+
public Set<String> getProvidesAsSet()
{
Set<String> condset = new HashSet<String>();
Added: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java (rev 0)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectInstaller.java 2007-07-12 15:33:12 UTC (rev 3860)
@@ -0,0 +1,58 @@
+/*
+ * 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.spi.deployment;
+
+//$Id: AbstractDeployer.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
+
+import java.util.Set;
+
+/**
+ * A deployment aspect installer.
+ *
+ * Use this installer with microkernel version 1.x
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DeploymentAspectInstaller
+{
+ private DeploymentAspectManager manager;
+ private Set<DeploymentAspect> aspects;
+
+ public void setManager(DeploymentAspectManager manager)
+ {
+ this.manager = manager;
+ }
+
+ public void setAspects(Set<DeploymentAspect> aspects)
+ {
+ this.aspects = aspects;
+ }
+
+ public void create()
+ {
+ for (DeploymentAspect aspect : aspects)
+ {
+ manager.addDeploymentAspect(aspect);
+ }
+ }
+}
\ No newline at end of file
17 years, 5 months
JBossWS SVN: r3859 - in branches/tdiesler/trunk/integration/jboss50: src/main/resources and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-12 10:28:23 -0400 (Thu, 12 Jul 2007)
New Revision: 3859
Added:
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/
branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Modified:
branches/tdiesler/trunk/integration/jboss50/build.xml
Log:
Move deployer to integration-jboss50
Modified: branches/tdiesler/trunk/integration/jboss50/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/jboss50/build.xml 2007-07-12 14:28:16 UTC (rev 3858)
+++ branches/tdiesler/trunk/integration/jboss50/build.xml 2007-07-12 14:28:23 UTC (rev 3859)
@@ -107,6 +107,16 @@
<metainf dir="${jbws50.resources.dir}/jbossws-jboss50.jar/META-INF"/>
</jar>
+ <!-- Build jbossws-native50.deployer -->
+ <zip zipfile="${jbws50.output.lib.dir}/jbossws-jboss50-deployer.zip">
+ <fileset dir="${jbws50.output.lib.dir}">
+ <include name="jbossws-jboss50.jar"/>
+ </fileset>
+ <fileset dir="${jbws50.resources.dir}/jbossws-jboss50.deployer">
+ <include name="META-INF/jbossws-deployer-beans.xml"/>
+ </fileset>
+ </zip>
+
<!-- Build jbossws50-src.zip -->
<zip zipfile="${jbws50.output.lib.dir}/jbossws-jboss50-src.zip" >
<fileset dir="${jbws50.java.dir}"/>
Added: branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml (rev 0)
+++ branches/tdiesler/trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-12 14:28:23 UTC (rev 3859)
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ *********************************************************************************************************************
+ Web Service deployment
+
+ There are three 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
+
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
+
+ - WebServiceDeployerJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
+
+ - WebServiceMainDeployer
+ - WSMainDeployerHook
+
+ Conceptually, each of these hooks implements the following pattern:
+
+ DeployerHook.deploy(unit)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeploymentAspectManager.deploy(dep)
+
+ DeployerHook.undeploy(unit)
+ Deployment dep = getDeployment(unit)
+ DeploymentAspectManager.undeploy(dep)
+
+ Each deployer hook has a web service DeploymentAspectManager injected into it.
+ A web service DeploymentAspectManager maintains a list of DeploymentAspects, each of which
+ handles a single aspect of web service deployment.
+
+ Finally, each Endpoint is registered with the EndpointRegistry.
+
+ *********************************************************************************************************************
+ -->
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in after the EJB deployers
+ -->
+ <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
+ <property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
+ <property name="relOrderEJB3"><inject bean="EJBRegistrationDeployer" property="relativeOrder"/></property>
+ <depends>EJB2xDeployer</depends>
+ <depends>EJBRegistrationDeployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in before the WAR deployer
+ -->
+ <bean name="WebServiceDeployerJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE">
+ <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ <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
+ -->
+ <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookJSE">
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+ <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerJSE</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookEJB21">
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE">
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+ <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerJSE</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookEJB3">
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </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
+ -->
+ <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.spi.deployment.BasicDeploymentAspectManager">
+ <property name="name">WSDeploymentAspectManagerJSE</property>
+ </bean>
+ <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.jboss50.ClassLoaderInjectionDeploymentAspect">
+ <property name="requires">AllowClassLoaderInjection</property>
+ <property name="provides">ContainerClassLoader</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSContextRootDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContextRoot</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSEndpointHandlerDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+ <property name="provides">ContainerEndpointHandler</property>
+ <property name="invocationHandler">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>JAXRPC_EJB21</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB21</value></entry>
+ <entry><key>JAXWS_JSE</key><value>org.jboss.wsf.spi.invocation.InvocationHandlerJSE</value></entry>
+ <entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB3</value></entry>
+ </map>
+ </property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
+ <property name="requires">LAST_DEPLOYMENT_ASPECT</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSEndpointMetricsDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointMetricsDeploymentAspect">
+ <property name="endpointMetrics"><inject bean="WSEndpointMetrics"/></property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSEndpointNameDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">EndpointName</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
+ <property name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property name="provides">RegisteredEndpoint</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
+ <property name="requires">ContextProperties</property>
+ <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSUnifiedDeploymentInfoDeploymentAspect" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
+ <property name="provides">ContainerMetaData</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <property name="requires">ContextRoot, ContainerMetaData</property>
+ <property name="provides">URLPattern</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebAppDeploymentAspect">
+ <property name="requires">WebMetaData, ContextProperties</property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">WebMetaData</property>
+ <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
+ <!-- Deployment aspect helper beans -->
+ <bean name="WSEndpointMetrics" class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
+ </bean>
+
+</deployment>
17 years, 5 months
JBossWS SVN: r3858 - in branches/tdiesler/trunk/integration/native: ant-import and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-12 10:28:16 -0400 (Thu, 12 Jul 2007)
New Revision: 3858
Removed:
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/
Modified:
branches/tdiesler/trunk/integration/native/ant-import/macros-deploy-native.xml
branches/tdiesler/trunk/integration/native/build.xml
Log:
Move deployer to integration-jboss50
Modified: branches/tdiesler/trunk/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/ant-import/macros-deploy-native.xml 2007-07-12 14:24:20 UTC (rev 3857)
+++ branches/tdiesler/trunk/integration/native/ant-import/macros-deploy-native.xml 2007-07-12 14:28:16 UTC (rev 3858)
@@ -62,9 +62,6 @@
<!-- SERVER JARS -->
<copy todir="${jboss50.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{jbosslibs}">
- <include name="jbossws-jboss50.jar"/>
- </fileset>
<fileset dir="@{corelibs}">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -73,7 +70,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="@{stacklibs}/jbossws-native50-deployer.zip"/>
+ <unzip dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer" src="@{jbosslibs}/jbossws-jboss50-deployer.zip"/>
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native50.sar"/>
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
@@ -116,7 +113,6 @@
<!-- SERVER JARS -->
<fileset dir="${jboss50.home}/server/${jboss.server.instance}/lib">
- <include name="jbossws-jboss50.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
Modified: branches/tdiesler/trunk/integration/native/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/build.xml 2007-07-12 14:24:20 UTC (rev 3857)
+++ branches/tdiesler/trunk/integration/native/build.xml 2007-07-12 14:28:16 UTC (rev 3858)
@@ -135,6 +135,7 @@
<!-- [JBAS-4379] MC beans deployed twice because of jacc service -->
<fileset dir="${native.output.lib.dir}">
<include name="jbossws-context.war/**"/>
+ <include name="jbossws-native.jar"/>
</fileset>
<fileset dir="${core.dir}/output/lib">
<include name="jbossws-core.jar"/>
@@ -153,15 +154,6 @@
</metainf>
</jar>
- <!-- Build jbossws-native50.deployer -->
- <zip zipfile="${native.output.lib.dir}/jbossws-native50-deployer.zip">
- <fileset dir="${native.output.lib.dir}">
- <include name="jbossws-native.jar"/>
- </fileset>
- <fileset dir="${native.resources.dir}/jbossws-native50.deployer">
- <include name="META-INF/jbossws-deployer-beans.xml"/>
- </fileset>
- </zip>
</target>
<target name="jars-jboss42" depends="jars-common" if="jboss42.home">
17 years, 5 months
JBossWS SVN: r3857 - in branches/hbraun/trunk/integration/sunri: src/main/java/org/jboss/wsf/stack/sunri and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-12 10:24:20 -0400 (Thu, 12 Jul 2007)
New Revision: 3857
Added:
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
Modified:
branches/hbraun/trunk/integration/sunri/build.xml
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
Log:
Register Sun-RI ServiceRefBinder with MC. Base for further tests
Modified: branches/hbraun/trunk/integration/sunri/build.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/build.xml 2007-07-12 14:02:02 UTC (rev 3856)
+++ branches/hbraun/trunk/integration/sunri/build.xml 2007-07-12 14:24:20 UTC (rev 3857)
@@ -112,15 +112,16 @@
<target name="jars-common" depends="compile">
<!-- Build jbossws-sunri.jar -->
- <mkdir dir="${sunri.output.lib.dir}"/>
+ <mkdir dir="${sunri.output.lib.dir}"/>
<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/**"/>
+ <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/metadata/**"/>
- <include name="org/jboss/wsf/stack/sunri/log/**"/>
- <include name="org/jboss/wsf/stack/sunri/*"/>
+ <include name="org/jboss/wsf/stack/sunri/client/**"/>
+ <include name="org/jboss/wsf/stack/sunri/metadata/**"/>
+ <include name="org/jboss/wsf/stack/sunri/log/**"/>
+ <include name="org/jboss/wsf/stack/sunri/*"/>
</fileset>
</jar>
Added: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java (rev 0)
+++ branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java 2007-07-12 14:24:20 UTC (rev 3857)
@@ -0,0 +1,41 @@
+/*
+ * 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.stack.sunri.client;
+
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 12, 2007
+ */
+public class DummyServiceRefBinderJAXRPC implements ServiceRefBinder
+{
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
+ {
+ throw new IllegalArgumentException("The Sun-RI stack doesnt support JAX-RPC service-ref deployments");
+ }
+}
Property changes on: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/DummyServiceRefBinderJAXRPC.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java (rev 0)
+++ branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java 2007-07-12 14:24:20 UTC (rev 3857)
@@ -0,0 +1,44 @@
+/*
+ * 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.stack.sunri.client;
+
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 12, 2007
+ */
+public class ServiceRefBinderJAXWS implements ServiceRefBinder
+{
+ public void setupServiceRef(
+ Context encCtx, String encName, AnnotatedElement anElement,
+ UnifiedServiceRefMetaData serviceRef)
+ throws NamingException
+ {
+ throw new IllegalArgumentException("Sun-RI service-ref handling is not yet implemented");
+ }
+}
Property changes on: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/client/ServiceRefBinderJAXWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-12 14:02:02 UTC (rev 3856)
+++ branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-12 14:24:20 UTC (rev 3857)
@@ -8,16 +8,6 @@
<bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
<property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
<property name="relOrderEJB3"><inject bean="EJBRegistrationDeployer" property="relativeOrder"/></property>
- <install bean="MainDeployer" method="addDeployer">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="MainDeployer" method="removeDeployer">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
<depends>EJB2xDeployer</depends>
<depends>EJBRegistrationDeployer</depends>
</bean>
@@ -27,16 +17,6 @@
-->
<bean name="WebServiceDeployerJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE">
<property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
- <install bean="MainDeployer" method="addDeployer">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="MainDeployer" method="removeDeployer">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
<depends>WebAppParsingDeployer</depends>
</bean>
@@ -46,16 +26,6 @@
<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>
- <install bean="MainDeployer" method="addDeployer">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="MainDeployer" method="removeDeployer">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
<depends>WarDeployer</depends>
<depends>WebServiceDeployerEJB</depends>
<depends>WebServiceDeployerJSE</depends>
Modified: branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-07-12 14:02:02 UTC (rev 3856)
+++ branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-07-12 14:24:20 UTC (rev 3857)
@@ -29,8 +29,15 @@
<bean name="WSEndpointRegistry" class="org.jboss.wsf.stack.sunri.ManagedEndpointRegistry"/>
<!-- Bind Service objects in client environment context -->
- <!-- The bean name is compiled into the server. Changeit with the next release. -->
- <!--bean name="ServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/-->
+ <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>
+
+ <bean name="WSServiceRefBinderJAXRPC" class="org.jboss.wsf.stack.sunri.client.DummyServiceRefBinderJAXRPC"/>
+
+ <bean name="WSServiceRefBinderJAXWS" class="org.jboss.wsf.stack.sunri.client.ServiceRefBinderJAXWS"/>
+
<!-- Locate the single instance of the kernel -->
<bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
17 years, 5 months
JBossWS SVN: r3856 - in branches/hbraun/trunk: jbossws-core/src/main/java/org/jboss/ws/core/client and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-12 10:02:02 -0400 (Thu, 12 Jul 2007)
New Revision: 3856
Removed:
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
Modified:
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
Log:
Cleanup legacy code
Modified: branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-12 13:59:37 UTC (rev 3855)
+++ branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-12 14:02:02 UTC (rev 3856)
@@ -38,7 +38,10 @@
-->
<!-- Bind Service objects in client environment context -->
- <bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/>
+ <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>
<!-- Note, JBoss_4_2_0_GA uses this hardcoded bean name -->
<bean name="ServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl">
Deleted: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-07-12 13:59:37 UTC (rev 3855)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefHandlerImpl.java 2007-07-12 14:02:02 UTC (rev 3856)
@@ -1,166 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-// $Id$
-
-import java.lang.reflect.AnnotatedElement;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.File;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.client.ServiceRefHandlerJAXRPC;
-import org.jboss.ws.core.jaxws.client.ServiceRefHandlerJAXWS;
-import org.jboss.ws.integration.*;
-import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.WSException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * Bind service refs in the client's ENC for every service-ref element in the
- * deployment descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerImpl implements ServiceRefHandler
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
-
- private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
-
- public ServiceRefMetaData newServiceRefMetaData()
- {
- return new UnifiedServiceRefMetaData();
- }
-
- public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
- {
- if (sref.isProcessed())
- {
- log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
- return;
- }
-
- // In case of an .war deployment the associated root file doesn't point to
- // the expanded war file structure and thus breaks service-ref usage for servlet clients.
- // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server module)
- if(vfsRoot instanceof URLLoaderAdapter)
- {
- URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
- URL rootURL = ula.toURL();
- if("file".equals( rootURL.getProtocol()) && rootURL.getFile().endsWith(".war") )
- {
- String fileName = rootURL.getFile();
-
- if( ! new File(fileName).exists() ) // might be an exploded directory
- {
- // There is a filename convention for exploded directories
- fileName = fileName.substring(0, fileName.indexOf(".war")) + "-exp.war";
-
- File expandedDirectory = new File(fileName);
- if(! expandedDirectory.exists())
- throw new WSException("Failed to bind service-ref, the deployment root expandedDirectory doesn't exist: " + fileName);
-
- // update the rootFile
- try
- {
- vfsRoot = new URLLoaderAdapter(expandedDirectory.toURL());
- }
- catch (MalformedURLException e){}
- }
-
- }
- }
-
- UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
- serviceRef.setVfsRoot(vfsRoot);
- try
- {
- if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
- {
- ServiceRefHandlerJAXRPC handler = new ServiceRefHandlerJAXRPC();
- handler.setupServiceRef(encCtx, encName, serviceRef);
- }
- else
- {
- AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
- ServiceRefHandlerJAXWS handler = new ServiceRefHandlerJAXWS();
- handler.setupServiceRef(encCtx, encName, anElement, serviceRef);
- }
- }
- finally
- {
- sref.setProcessed(true);
- }
- }
-
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
- }
-
- private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
- {
- // The service-ref-type is JAXWS specific
- String serviceRefType = serviceRef.getServiceRefType();
- if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
- return Type.JAXWS;
-
- // The mapping-file is JAXRPC specific
- if (serviceRef.getMappingFile() != null)
- return Type.JAXRPC;
-
- String siName = serviceRef.getServiceInterface();
- if (siName == null)
- throw new IllegalStateException("<service-interface> cannot be null");
-
- if (siName.equals("javax.xml.rpc.Service"))
- return Type.JAXRPC;
-
- try
- {
- Class siClass = loader.loadClass(siName);
- if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
- return Type.JAXWS;
- else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
- return Type.JAXRPC;
- else throw new IllegalStateException("Illegal service interface: " + siName);
- }
- catch (ClassNotFoundException e)
- {
- throw new IllegalStateException("Cannot load <service-interface>: " + siName);
- }
- }
-}
Deleted: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java 2007-07-12 13:59:37 UTC (rev 3855)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/ServiceRefObjectFactory.java 2007-07-12 14:02:02 UTC (rev 3856)
@@ -1,305 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.client;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.integration.ServiceRefElement;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A object model factory for <service-ref>
- *
- * @author Thomas.Diesler(a)jboss.com
- */
-public class ServiceRefObjectFactory
-{
- public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (ref instanceof UnifiedHandlerChainsMetaData)
- child = newChild((UnifiedHandlerChainsMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedHandlerMetaData)
- child = newChild((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- child = newChild((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, attrs);
- else if (ref instanceof UnifiedServiceRefMetaData)
- child = newChild((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, attrs);
- return child;
- }
-
- public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedHandlerChainMetaData)
- setValue((UnifiedHandlerChainMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedHandlerMetaData)
- setValue((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedInitParamMetaData)
- setValue((UnifiedInitParamMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedPortComponentRefMetaData)
- setValue((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedServiceRefMetaData)
- setValue((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedCallPropertyMetaData)
- setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- else if (ref instanceof UnifiedStubPropertyMetaData)
- setValue((UnifiedStubPropertyMetaData)ref, navigator, namespaceURI, localName, value);
- }
-
- private void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- /* Standard properties */
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-interface"))
- {
- ref.setServiceInterface(value);
- }
- else if (localName.equals("service-ref-type"))
- {
- ref.setServiceRefType(value);
- }
- else if (localName.equals("wsdl-file"))
- {
- ref.setWsdlFile(value);
- }
- else if (localName.equals("jaxrpc-mapping-file"))
- {
- ref.setMappingFile(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(getQNameValue(navigator, value));
- }
-
- /* JBoss properties */
- else if (localName.equals("service-impl-class"))
- {
- ref.setServiceImplClass(value);
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlOverride(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- }
-
- private Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("port-component-ref"))
- {
- child = new UnifiedPortComponentRefMetaData(ref);
- ref.addPortComponentRef((UnifiedPortComponentRefMetaData)child);
- }
- else if (localName.equals("handler"))
- {
- child = new UnifiedHandlerMetaData();
- ref.addHandler((UnifiedHandlerMetaData)child);
- }
- else if (localName.equals("handler-chains"))
- {
- child = new UnifiedHandlerChainsMetaData();
- ref.setHandlerChains((UnifiedHandlerChainsMetaData)child);
- }
- else if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- return child;
- }
-
- private Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("handler-chain"))
- {
- child = new UnifiedHandlerChainMetaData();
- ref.addHandlerChain((UnifiedHandlerChainMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedPortComponentRefMetaData pcref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- pcref.setServiceEndpointInterface(value);
- }
- else if (localName.equals("enable-mtom"))
- {
- pcref.setEnableMTOM(Boolean.valueOf(value));
- }
- else if (localName.equals("port-component-link"))
- {
- pcref.setPortComponentLink(value);
- }
- else if (localName.equals("port-qname"))
- {
- pcref.setPortQName(getQNameValue(navigator, value));
- }
- else if (localName.equals("config-name"))
- {
- pcref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- pcref.setConfigFile(value);
- }
- }
-
- private Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("call-property"))
- {
- child = new UnifiedCallPropertyMetaData();
- ref.addCallProperty((UnifiedCallPropertyMetaData)child);
- }
- if (localName.equals("stub-property"))
- {
- child = new UnifiedStubPropertyMetaData();
- ref.addStubProperty((UnifiedStubPropertyMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-name-pattern"))
- {
- ref.setServiceNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("port-name-pattern"))
- {
- ref.setPortNamePattern(getQNameValue(navigator, value));
- }
- else if (localName.equals("protocol-binding"))
- {
- ref.setProtocolBindings(value);
- }
- }
-
- private void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("handler-name"))
- {
- ref.setHandlerName(value);
- }
- else if (localName.equals("handler-class"))
- {
- ref.setHandlerClass(value);
- }
- else if (localName.equals("soap-header"))
- {
- ref.addSoapHeader(getQNameValue(navigator, value));
- }
- else if (localName.equals("soap-role"))
- {
- ref.addSoapRole(value);
- }
- else if (localName.equals("port-name"))
- {
- ref.addPortName(value);
- }
- }
-
- private Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("init-param"))
- {
- child = new UnifiedInitParamMetaData();
- ref.addInitParam((UnifiedInitParamMetaData)child);
- }
- return child;
- }
-
- private void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("param-name"))
- {
- ref.setParamName(value);
- }
- else if (localName.equals("param-value"))
- {
- ref.setParamValue(value);
- }
- }
-
- private void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("prop-name"))
- {
- ref.setPropName(value);
- }
- else if (localName.equals("prop-value"))
- {
- ref.setPropValue(value);
- }
- }
-
- private QName getQNameValue(UnmarshallingContext navigator, String value)
- {
- QName qname = (value.startsWith("{") ? QName.valueOf(value) : navigator.resolveQName(value));
- return qname;
- }
-}
Deleted: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java 2007-07-12 13:59:37 UTC (rev 3855)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefHandlerJAXRPC.java 2007-07-12 14:02:02 UTC (rev 3856)
@@ -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.ws.core.jaxrpc.client;
-
-// $Id$
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
- * deployment descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Nov-2006
- */
-public class ServiceRefHandlerJAXRPC
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceRefHandlerJAXRPC.class);
-
- /**
- * Binds a Service into the callers ENC for every service-ref element
- */
- public void setupServiceRef(Context encCtx, String encName, UnifiedServiceRefMetaData serviceRef) throws NamingException
- {
- String externalName = encCtx.getNameInNamespace() + "/" + encName;
- log.info("setupServiceRef [jndi=" + externalName + "]");
-
- // Do not use rebind, the binding should be unique
- ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
- Util.bind(encCtx, encName, ref);
- }
-}
Deleted: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-07-12 13:59:37 UTC (rev 3855)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-07-12 14:02:02 UTC (rev 3856)
@@ -1,182 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxws.client;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-import javax.jws.HandlerChain;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Binds a JAXWS Service object in the client's ENC
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 17-Jan-2007
- */
-public class ServiceRefHandlerJAXWS
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceRefHandlerJAXWS.class);
-
- public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
- {
- WebServiceRef wsref = null;
-
- // Build the list of @WebServiceRef relevant annotations
- List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- if (anElement != null)
- {
- for (Annotation an : anElement.getAnnotations())
- {
- if (an instanceof WebServiceRef)
- wsrefList.add((WebServiceRef)an);
-
- if (an instanceof WebServiceRefs)
- {
- WebServiceRefs wsrefs = (WebServiceRefs)an;
- for (WebServiceRef aux : wsrefs.value())
- wsrefList.add(aux);
- }
- }
- }
-
- // Use the single @WebServiceRef
- if (wsrefList.size() == 1)
- {
- wsref = wsrefList.get(0);
- }
- else
- {
- for (WebServiceRef aux : wsrefList)
- {
- if (encName.endsWith("/" + aux.name()))
- {
- wsref = aux;
- break;
- }
- }
- }
-
- Class targetClass = null;
- if (anElement instanceof Field)
- {
- targetClass = ((Field)anElement).getType();
- }
- else if (anElement instanceof Method)
- {
- targetClass = ((Method)anElement).getParameterTypes()[0];
- }
- else
- {
- if( wsref!=null && (wsref.type() != Object.class) )
- targetClass = wsref.type();
- }
-
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
- String externalName = encCtx.getNameInNamespace() + "/" + encName;
- log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
-
- String serviceImplClass = null;
-
- // #1 Use the explicit @WebServiceRef.value
- if (wsref != null && wsref.value() != Object.class)
- serviceImplClass = wsref.value().getName();
-
- // #2 Use the target ref type
- if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
- serviceImplClass = targetClass.getName();
-
- // #3 Use <service-interface>
- if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
- serviceImplClass = serviceRef.getServiceInterface();
-
- // #4 Use javax.xml.ws.Service
- if (serviceImplClass == null)
- serviceImplClass = Service.class.getName();
-
- // #1 Use the explicit @WebServiceRef.type
- if (wsref != null && wsref.type() != Object.class)
- targetClassName = wsref.type().getName();
-
-
- // #2 Use the target ref type
- if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
- targetClassName = targetClass.getName();
-
- // Set the wsdlLocation if there is no override already
- if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
- serviceRef.setWsdlOverride(wsref.wsdlLocation());
-
- // Set the handlerChain from @HandlerChain on the annotated element
- String handlerChain = serviceRef.getHandlerChain();
- if (anElement != null)
- {
- HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
- if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
- handlerChain = anHandlerChain.file();
- }
-
- // Resolve path to handler chain
- if (handlerChain != null)
- {
- try
- {
- new URL(handlerChain);
- }
- catch (MalformedURLException ex)
- {
- Class declaringClass = null;
- if (anElement instanceof Field)
- declaringClass = ((Field)anElement).getDeclaringClass();
- else if (anElement instanceof Method)
- declaringClass = ((Method)anElement).getDeclaringClass();
- else if (anElement instanceof Class)
- declaringClass = (Class)anElement;
-
- handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
- }
-
- serviceRef.setHandlerChain(handlerChain);
- }
-
- // Do not use rebind, the binding should be unique
- // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
- Util.bind(encCtx, encName, new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef));
-
- }
-}
17 years, 5 months
JBossWS SVN: r3855 - in branches/hbraun/trunk: integration/native/src/main/resources/jbossws-native50.sar/META-INF and 17 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-07-12 09:59:37 -0400 (Thu, 12 Jul 2007)
New Revision: 3855
Added:
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java
branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
Modified:
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
branches/hbraun/trunk/integration/sunri/build.xml
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
branches/hbraun/trunk/integration/sunri/src/test/resources/test-excludes.txt
branches/hbraun/trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt
branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt
branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
Log:
Split serviceRef handling into SPI and stack specific implementation
Modified: branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -32,13 +32,28 @@
<bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager">
<property name="bindAddress">${jboss.bind.address}</property>
</bean>
-
- <!-- Bind Service objects in client environment context -->
- <bean name="WSServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-
- <!-- Note, JBoss_4_2_0_GA uses this hardcoded bean name -->
- <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-
+
+ <!--
+ ServiceRe Handling
+ -->
+
+ <!-- Bind Service objects in client environment context -->
+ <bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/>
+
+ <!-- Note, 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.ws.core.jaxrpc.client.ServiceRefBinderJAXRPC"/>
+
+ <bean name="WSServiceRefBinderJAXWS" class="org.jboss.ws.core.jaxws.client.ServiceRefBinderJAXWS"/>
+
+ <!--
+ MC Utils
+ -->
+
<!-- Locate the single instance of the kernel -->
<bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
Modified: branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -34,8 +34,15 @@
</bean>
<!-- Bind Service objects in client environment context -->
- <bean name="WSServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
-
+ <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>
+
+ <bean name="WSServiceRefBinderJAXRPC" class="org.jboss.ws.core.jaxrpc.client.ServiceRefBinderJAXRPC"/>
+
+ <bean name="WSServiceRefBinderJAXWS" class="org.jboss.ws.core.jaxws.client.ServiceRefBinderJAXWS"/>
+
<!-- Locate the single instance of the kernel -->
<bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
Modified: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -27,6 +27,7 @@
import javax.naming.NamingException;
import org.jboss.xb.binding.UnmarshallingContext;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
import org.xml.sax.Attributes;
/**
@@ -46,4 +47,8 @@
void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value);
void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
+
+ void setJaxrpcBinder(ServiceRefBinder binder);
+
+ void setJaxwsBinder(ServiceRefBinder binder);
}
Modified: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/ws/integration/ServiceRefHandlerFactory.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -57,7 +57,7 @@
KernelRegistryEntry entry = registry.getEntry(ServiceRefHandler.BEAN_NAME);
ServiceRefHandler handler = (ServiceRefHandler)entry.getTarget();
- // Try legancy JBossAS-4.2 name
+ // Try legacy JBossAS-4.2 name
if (handler == null)
{
entry = registry.getEntry("ServiceRefHandler");
@@ -69,7 +69,7 @@
private static ServiceRefHandler getClientSideServiceRefHandler()
{
String propName = ServiceRefHandler.class.getName();
- String defaultImpl = "org.jboss.ws.core.client.ServiceRefHandlerImpl";
+ String defaultImpl = "org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl";
ServiceRefHandler handler = (ServiceRefHandler)ServiceLoader.loadService(propName, defaultImpl);
return handler;
}
Added: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java (rev 0)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,65 @@
+/*
+ * 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.spi;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 11, 2007
+ */
+public class WSFException extends RuntimeException
+{
+ public WSFException()
+ {
+ super();
+ }
+
+ public WSFException(String message)
+ {
+ super(message);
+ }
+
+ public WSFException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public WSFException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public static void rethrow(String string, Throwable th)
+ {
+ if (th instanceof WSFException)
+ throw (WSFException)th;
+
+ throw new WSFException(string, th);
+ }
+
+ public static void rethrow(Throwable th)
+ {
+ if (th instanceof WSFException)
+ throw (WSFException)th;
+
+ throw new WSFException(th);
+ }
+}
Property changes on: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/WSFException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java (rev 0)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,44 @@
+/*
+ * 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.spi.deployment.serviceref;
+
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * Creates a ServiceReferenceable and binds it to JNDI.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 11, 2007
+ */
+public interface ServiceRefBinder
+{
+ public final static String JAXRPC_BINDER = "WSServiceRefBinderJAXRPC";
+
+ public final static String JAXWS_BINDER = "WSServiceRefBinderJAXWS";
+
+ void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef)
+ throws NamingException;
+}
Property changes on: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefBinder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java (rev 0)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,180 @@
+/*
+ * 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.spi.deployment.serviceref;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.*;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import java.io.File;
+import java.lang.reflect.AnnotatedElement;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Bind service refs in the client's ENC
+ * for every service-ref element in the deployment descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.com
+ *
+ * @since 04-Nov-2006
+ */
+public class ServiceRefHandlerImpl implements ServiceRefHandler
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefHandlerImpl.class);
+
+ private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
+
+ enum Type {JAXRPC, JAXWS};
+
+ /* binds jaxrpc deployments */
+ private ServiceRefBinder jaxrpcBinder;
+
+ /*binds jaxws deployments */
+ private ServiceRefBinder jaxwsBinder;
+
+ public void setJaxrpcBinder(ServiceRefBinder binder)
+ {
+ this.jaxrpcBinder = binder;
+ }
+
+ public void setJaxwsBinder(ServiceRefBinder binder)
+ {
+ this.jaxwsBinder = binder;
+ }
+
+ public ServiceRefMetaData newServiceRefMetaData()
+ {
+ return new UnifiedServiceRefMetaData();
+ }
+
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
+ {
+ if (sref.isProcessed())
+ {
+ log.debug("Attempt to rebind the service-ref: " + sref.getServiceRefName());
+ return;
+ }
+
+ // In case of an .war deployment the associated root file doesn't point to
+ // the expanded war file structure and thus breaks service-ref usage for servlet clients.
+ // This needs to be fixed in org.jboss.web.AbstractWebDeployer (JBOSS_AS/server module)
+ if(vfsRoot instanceof URLLoaderAdapter)
+ {
+ URLLoaderAdapter ula = (URLLoaderAdapter)vfsRoot;
+ URL rootURL = ula.toURL();
+ if("file".equals( rootURL.getProtocol()) && rootURL.getFile().endsWith(".war") )
+ {
+ String fileName = rootURL.getFile();
+
+ if( ! new File(fileName).exists() ) // might be an exploded directory
+ {
+ // There is a filename convention for exploded directories
+ fileName = fileName.substring(0, fileName.indexOf(".war")) + "-exp.war";
+
+ File expandedDirectory = new File(fileName);
+ if(! expandedDirectory.exists())
+ throw new WSFException("Failed to bind service-ref, the deployment root expandedDirectory doesn't exist: " + fileName);
+
+ // update the rootFile
+ try
+ {
+ vfsRoot = new URLLoaderAdapter(expandedDirectory.toURL());
+ }
+ catch (MalformedURLException e){}
+ }
+
+ }
+ }
+
+ UnifiedServiceRefMetaData serviceRef = (UnifiedServiceRefMetaData)sref;
+ serviceRef.setVfsRoot(vfsRoot);
+ try
+ {
+ if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
+ {
+ jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef);
+ }
+ else
+ {
+ AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
+ jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef);
+ }
+ }
+ finally
+ {
+ sref.setProcessed(true);
+ }
+ }
+
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ return objectFactory.newChild(ref, navigator, namespaceURI, localName, attrs);
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ objectFactory.setValue(ref, navigator, namespaceURI, localName, value);
+ }
+
+ private Type getServiceRefType(UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException
+ {
+ // The service-ref-type is JAXWS specific
+ String serviceRefType = serviceRef.getServiceRefType();
+ if (serviceRefType != null || serviceRef.getAnnotatedElement() != null)
+ return Type.JAXWS;
+
+ // The mapping-file is JAXRPC specific
+ if (serviceRef.getMappingFile() != null)
+ return Type.JAXRPC;
+
+ String siName = serviceRef.getServiceInterface();
+ if (siName == null)
+ throw new IllegalStateException("<service-interface> cannot be null");
+
+ if (siName.equals("javax.xml.rpc.Service"))
+ return Type.JAXRPC;
+
+ try
+ {
+ Class siClass = loader.loadClass(siName);
+ if (javax.xml.ws.Service.class.isAssignableFrom(siClass))
+ return Type.JAXWS;
+ else if (javax.xml.rpc.Service.class.isAssignableFrom(siClass))
+ return Type.JAXRPC;
+ else throw new IllegalStateException("Illegal service interface: " + siName);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalStateException("Cannot load <service-interface>: " + siName);
+ }
+ }
+}
Property changes on: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
===================================================================
--- branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java (rev 0)
+++ branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,305 @@
+/*
+ * 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.spi.deployment.serviceref;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.integration.ServiceRefElement;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A object model factory for <service-ref>
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public class ServiceRefObjectFactory
+{
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (ref instanceof UnifiedHandlerChainsMetaData)
+ child = newChild((UnifiedHandlerChainsMetaData)ref, navigator, namespaceURI, localName, attrs);
+ else if (ref instanceof UnifiedHandlerMetaData)
+ child = newChild((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, attrs);
+ else if (ref instanceof UnifiedPortComponentRefMetaData)
+ child = newChild((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, attrs);
+ else if (ref instanceof UnifiedServiceRefMetaData)
+ child = newChild((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, attrs);
+ return child;
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (ref instanceof UnifiedCallPropertyMetaData)
+ setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedHandlerChainMetaData)
+ setValue((UnifiedHandlerChainMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedHandlerMetaData)
+ setValue((UnifiedHandlerMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedInitParamMetaData)
+ setValue((UnifiedInitParamMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedPortComponentRefMetaData)
+ setValue((UnifiedPortComponentRefMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedServiceRefMetaData)
+ setValue((UnifiedServiceRefMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedCallPropertyMetaData)
+ setValue((UnifiedCallPropertyMetaData)ref, navigator, namespaceURI, localName, value);
+ else if (ref instanceof UnifiedStubPropertyMetaData)
+ setValue((UnifiedStubPropertyMetaData)ref, navigator, namespaceURI, localName, value);
+ }
+
+ private void setValue(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ /* Standard properties */
+ if (localName.equals("service-ref-name"))
+ {
+ ref.setServiceRefName(value);
+ }
+ else if (localName.equals("service-interface"))
+ {
+ ref.setServiceInterface(value);
+ }
+ else if (localName.equals("service-ref-type"))
+ {
+ ref.setServiceRefType(value);
+ }
+ else if (localName.equals("wsdl-file"))
+ {
+ ref.setWsdlFile(value);
+ }
+ else if (localName.equals("jaxrpc-mapping-file"))
+ {
+ ref.setMappingFile(value);
+ }
+ else if (localName.equals("service-qname"))
+ {
+ ref.setServiceQName(getQNameValue(navigator, value));
+ }
+
+ /* JBoss properties */
+ else if (localName.equals("service-impl-class"))
+ {
+ ref.setServiceImplClass(value);
+ }
+ else if (localName.equals("config-name"))
+ {
+ ref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ ref.setConfigFile(value);
+ }
+ else if (localName.equals("wsdl-override"))
+ {
+ ref.setWsdlOverride(value);
+ }
+ else if (localName.equals("handler-chain"))
+ {
+ ref.setHandlerChain(value);
+ }
+ }
+
+ private Object newChild(UnifiedServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("port-component-ref"))
+ {
+ child = new UnifiedPortComponentRefMetaData(ref);
+ ref.addPortComponentRef((UnifiedPortComponentRefMetaData)child);
+ }
+ else if (localName.equals("handler"))
+ {
+ child = new UnifiedHandlerMetaData();
+ ref.addHandler((UnifiedHandlerMetaData)child);
+ }
+ else if (localName.equals("handler-chains"))
+ {
+ child = new UnifiedHandlerChainsMetaData();
+ ref.setHandlerChains((UnifiedHandlerChainsMetaData)child);
+ }
+ else if (localName.equals("call-property"))
+ {
+ child = new UnifiedCallPropertyMetaData();
+ ref.addCallProperty((UnifiedCallPropertyMetaData)child);
+ }
+ return child;
+ }
+
+ private Object newChild(UnifiedHandlerChainsMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("handler-chain"))
+ {
+ child = new UnifiedHandlerChainMetaData();
+ ref.addHandlerChain((UnifiedHandlerChainMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedPortComponentRefMetaData pcref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-endpoint-interface"))
+ {
+ pcref.setServiceEndpointInterface(value);
+ }
+ else if (localName.equals("enable-mtom"))
+ {
+ pcref.setEnableMTOM(Boolean.valueOf(value));
+ }
+ else if (localName.equals("port-component-link"))
+ {
+ pcref.setPortComponentLink(value);
+ }
+ else if (localName.equals("port-qname"))
+ {
+ pcref.setPortQName(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("config-name"))
+ {
+ pcref.setConfigName(value);
+ }
+ else if (localName.equals("config-file"))
+ {
+ pcref.setConfigFile(value);
+ }
+ }
+
+ private Object newChild(UnifiedPortComponentRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("call-property"))
+ {
+ child = new UnifiedCallPropertyMetaData();
+ ref.addCallProperty((UnifiedCallPropertyMetaData)child);
+ }
+ if (localName.equals("stub-property"))
+ {
+ child = new UnifiedStubPropertyMetaData();
+ ref.addStubProperty((UnifiedStubPropertyMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedHandlerChainMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("service-name-pattern"))
+ {
+ ref.setServiceNamePattern(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("port-name-pattern"))
+ {
+ ref.setPortNamePattern(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("protocol-binding"))
+ {
+ ref.setProtocolBindings(value);
+ }
+ }
+
+ private void setValue(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("handler-name"))
+ {
+ ref.setHandlerName(value);
+ }
+ else if (localName.equals("handler-class"))
+ {
+ ref.setHandlerClass(value);
+ }
+ else if (localName.equals("soap-header"))
+ {
+ ref.addSoapHeader(getQNameValue(navigator, value));
+ }
+ else if (localName.equals("soap-role"))
+ {
+ ref.addSoapRole(value);
+ }
+ else if (localName.equals("port-name"))
+ {
+ ref.addPortName(value);
+ }
+ }
+
+ private Object newChild(UnifiedHandlerMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (localName.equals("init-param"))
+ {
+ child = new UnifiedInitParamMetaData();
+ ref.addInitParam((UnifiedInitParamMetaData)child);
+ }
+ return child;
+ }
+
+ private void setValue(UnifiedInitParamMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("param-name"))
+ {
+ ref.setParamName(value);
+ }
+ else if (localName.equals("param-value"))
+ {
+ ref.setParamValue(value);
+ }
+ }
+
+ private void setValue(UnifiedCallPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ private void setValue(UnifiedStubPropertyMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (localName.equals("prop-name"))
+ {
+ ref.setPropName(value);
+ }
+ else if (localName.equals("prop-value"))
+ {
+ ref.setPropValue(value);
+ }
+ }
+
+ private QName getQNameValue(UnmarshallingContext navigator, String value)
+ {
+ QName qname = (value.startsWith("{") ? QName.valueOf(value) : navigator.resolveQName(value));
+ return qname;
+ }
+}
Property changes on: branches/hbraun/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/serviceref/ServiceRefObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/trunk/integration/sunri/build.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/build.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/build.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -117,6 +117,7 @@
<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/metadata/**"/>
<include name="org/jboss/wsf/stack/sunri/log/**"/>
<include name="org/jboss/wsf/stack/sunri/*"/>
Modified: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -80,6 +80,8 @@
* {@link createInvoker(Class)}
*
*
+ * @see com.sun.xml.ws.transport.http.servlet.WSServletContextListener
+ *
* @author WS Development Team
* @author Kohsuke Kawaguchi
* @author Thomas.Diesler(a)jboss.org
Modified: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -23,24 +23,11 @@
// $Id$
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextAttributeEvent;
-import javax.servlet.ServletContextAttributeListener;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import javax.xml.ws.WebServiceException;
-
import com.sun.istack.NotNull;
import com.sun.xml.ws.api.server.BoundEndpoint;
import com.sun.xml.ws.api.server.Container;
import com.sun.xml.ws.api.server.Module;
+import com.sun.xml.ws.api.server.ResourceInjector;
import com.sun.xml.ws.resources.WsservletMessages;
import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
@@ -48,6 +35,15 @@
import com.sun.xml.ws.transport.http.servlet.WSServlet;
import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
+import javax.servlet.*;
+import javax.xml.ws.WebServiceException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
/**
* A copy of WSServletContextListener that externalizes
*
@@ -173,10 +169,16 @@
{
return (T)servletContext;
}
- if (spiType == Module.class)
+ else if (spiType == Module.class)
{
return spiType.cast(module);
}
+ else if(spiType == ResourceInjector.class)
+ {
+ return (T)ResourceInjector.STANDALONE;
+ }
+
+ logger.log(Level.WARNING, "Unable to resolve SPI for type: " + spiType);
return null;
}
}
Added: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java (rev 0)
+++ branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,47 @@
+/*
+ * 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.stack.sunri.injection;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.server.ResourceInjector;
+import com.sun.xml.ws.api.server.WSWebServiceContext;
+
+import javax.xml.ws.WebServiceContext;
+
+/**
+ * Default {@link ResourceInjector}.
+ *
+ * @see ResourceInjector#STANDALONE
+ * @author Kohsuke Kawaguchi
+ */
+public final class JBossResourceInjector extends ResourceInjector {
+
+ public void inject(@NotNull WSWebServiceContext context, @NotNull Object instance) {
+// AbstractInstanceResolver.buildInjectionPlan(
+// instance.getClass(),
+// WebServiceContext.class,
+// false
+// ).inject(instance,context);
+
+ System.out.println("!!! inject " + context+ " into " + instance);
+ }
+}
Property changes on: branches/hbraun/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/injection/JBossResourceInjector.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -31,7 +31,9 @@
<!-- Bind Service objects in client environment context -->
<!-- The bean name is compiled into the server. Changeit with the next release. -->
- <!--bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/-->
+
+ <!-- Bind Service objects in client environment context -->
+ <!--bean name="WSServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/-->
<!-- Locate the single instance of the kernel -->
<bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
Modified: branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -30,7 +30,7 @@
<!-- Bind Service objects in client environment context -->
<!-- The bean name is compiled into the server. Changeit with the next release. -->
- <!--bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/-->
+ <!--bean name="ServiceRefHandler" class="org.jboss.wsf.spi.deployment.serviceref.ServiceRefHandlerImpl"/-->
<!-- Locate the single instance of the kernel -->
<bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
Modified: branches/hbraun/trunk/integration/sunri/src/test/resources/test-excludes.txt
===================================================================
--- branches/hbraun/trunk/integration/sunri/src/test/resources/test-excludes.txt 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/integration/sunri/src/test/resources/test-excludes.txt 2007-07-12 13:59:37 UTC (rev 3855)
@@ -18,5 +18,4 @@
org/jboss/test/ws/jaxws/samples/jaxr/**
# [JBWS-1674] Fix @WebServiceRef with SunRI
-org/jboss/test/ws/jaxws/samples/retail/**
-org/jboss/test/ws/jaxws/samples/webserviceref/**
+#org/jboss/test/ws/jaxws/samples/retail/**
Modified: branches/hbraun/trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- branches/hbraun/trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-07-12 13:59:37 UTC (rev 3855)
@@ -348,7 +348,9 @@
<war warfile="${tests.output.dir}/libs/jaxws-serviceref.war" webxml="${tests.output.dir}/resources/jaxws/serviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointImpl.class"/>
- </classes>
+ <include name="org/jboss/test/ws/jaxws/serviceref/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/serviceref/TestEndpointService.class"/>
+ </classes>
</war>
<jar destfile="${tests.output.dir}/libs/jaxws-serviceref-client.jar">
<fileset dir="${tests.output.dir}/classes">
Added: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java (rev 0)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxrpc.client;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+
+import java.lang.reflect.AnnotatedElement;
+
+/**
+ * Binds a JAXRPC Service object in the client's ENC for every service-ref element in the
+ * deployment descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Nov-2006
+ */
+public class ServiceRefBinderJAXRPC implements ServiceRefBinder
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefBinderJAXRPC.class);
+
+ /**
+ * Binds a Service into the callers ENC for every service-ref element
+ */
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef)
+ throws NamingException
+ {
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ log.info("setupServiceRef [jndi=" + externalName + "]");
+
+ // Do not use rebind, the binding should be unique
+ ServiceReferenceable ref = new ServiceReferenceable(serviceRef);
+ Util.bind(encCtx, encName, ref);
+ }
+}
Property changes on: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceRefBinderJAXRPC.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java (rev 0)
+++ branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxws.client;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.deployment.serviceref.ServiceRefBinder;
+
+import javax.jws.HandlerChain;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Binds a JAXWS Service object in the client's ENC
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 17-Jan-2007
+ */
+public class ServiceRefBinderJAXWS implements ServiceRefBinder
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ServiceRefBinderJAXWS.class);
+
+ public void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement, UnifiedServiceRefMetaData serviceRef) throws NamingException
+ {
+ WebServiceRef wsref = null;
+
+ // Build the list of @WebServiceRef relevant annotations
+ List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+ if (anElement != null)
+ {
+ for (Annotation an : anElement.getAnnotations())
+ {
+ if (an instanceof WebServiceRef)
+ wsrefList.add((WebServiceRef)an);
+
+ if (an instanceof WebServiceRefs)
+ {
+ WebServiceRefs wsrefs = (WebServiceRefs)an;
+ for (WebServiceRef aux : wsrefs.value())
+ wsrefList.add(aux);
+ }
+ }
+ }
+
+ // Use the single @WebServiceRef
+ if (wsrefList.size() == 1)
+ {
+ wsref = wsrefList.get(0);
+ }
+ else
+ {
+ for (WebServiceRef aux : wsrefList)
+ {
+ if (encName.endsWith("/" + aux.name()))
+ {
+ wsref = aux;
+ break;
+ }
+ }
+ }
+
+ Class targetClass = null;
+ if (anElement instanceof Field)
+ {
+ targetClass = ((Field)anElement).getType();
+ }
+ else if (anElement instanceof Method)
+ {
+ targetClass = ((Method)anElement).getParameterTypes()[0];
+ }
+ else
+ {
+ if( wsref!=null && (wsref.type() != Object.class) )
+ targetClass = wsref.type();
+ }
+
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ String externalName = encCtx.getNameInNamespace() + "/" + encName;
+ log.debug("setupServiceRef [jndi=" + externalName + ",target=" + targetClassName + "]");
+
+ String serviceImplClass = null;
+
+ // #1 Use the explicit @WebServiceRef.value
+ if (wsref != null && wsref.value() != Object.class)
+ serviceImplClass = wsref.value().getName();
+
+ // #2 Use the target ref type
+ if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
+ serviceImplClass = targetClass.getName();
+
+ // #3 Use <service-interface>
+ if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
+ serviceImplClass = serviceRef.getServiceInterface();
+
+ // #4 Use javax.xml.ws.Service
+ if (serviceImplClass == null)
+ serviceImplClass = Service.class.getName();
+
+ // #1 Use the explicit @WebServiceRef.type
+ if (wsref != null && wsref.type() != Object.class)
+ targetClassName = wsref.type().getName();
+
+
+ // #2 Use the target ref type
+ if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
+ targetClassName = targetClass.getName();
+
+ // Set the wsdlLocation if there is no override already
+ if (serviceRef.getWsdlOverride() == null && wsref != null && wsref.wsdlLocation().length() > 0)
+ serviceRef.setWsdlOverride(wsref.wsdlLocation());
+
+ // Set the handlerChain from @HandlerChain on the annotated element
+ String handlerChain = serviceRef.getHandlerChain();
+ if (anElement != null)
+ {
+ HandlerChain anHandlerChain = anElement.getAnnotation(HandlerChain.class);
+ if (handlerChain == null && anHandlerChain != null && anHandlerChain.file().length() > 0)
+ handlerChain = anHandlerChain.file();
+ }
+
+ // Resolve path to handler chain
+ if (handlerChain != null)
+ {
+ try
+ {
+ new URL(handlerChain);
+ }
+ catch (MalformedURLException ex)
+ {
+ Class declaringClass = null;
+ if (anElement instanceof Field)
+ declaringClass = ((Field)anElement).getDeclaringClass();
+ else if (anElement instanceof Method)
+ declaringClass = ((Method)anElement).getDeclaringClass();
+ else if (anElement instanceof Class)
+ declaringClass = (Class)anElement;
+
+ handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
+ }
+
+ serviceRef.setHandlerChain(handlerChain);
+ }
+
+ // Do not use rebind, the binding should be unique
+ // [JBWS-1499] - Revisit WebServiceRefHandler JNDI rebind
+ Util.bind(encCtx, encName, new ServiceReferenceable(serviceImplClass, targetClassName, serviceRef));
+
+ }
+}
Property changes on: branches/hbraun/trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceRefBinderJAXWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss40.txt 2007-07-12 13:59:37 UTC (rev 3855)
@@ -1,6 +1,3 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
# JBossAS-4.0 excludes
org/jboss/test/ws/jaxrpc/jbws723/**
Modified: branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss42.txt 2007-07-12 13:59:37 UTC (rev 3855)
@@ -1,10 +1,7 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
# EJB3/Injection excludes
org/jboss/test/ws/jaxws/endpoint/**
org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainClientTestCase*
org/jboss/test/ws/jaxws/samples/retail/**
org/jboss/test/ws/jaxws/samples/webserviceref/**
-org/jboss/test/ws/jaxws/serviceref/**
+#org/jboss/test/ws/jaxws/serviceref/**
Modified: branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt
===================================================================
--- branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/jbossws-core/src/test/resources/test-excludes-jboss50.txt 2007-07-12 13:59:37 UTC (rev 3855)
@@ -1,6 +1,3 @@
-# Always exclude
-org/jboss/test/ws/benchmark/**
-
# Fix before JBoss50 goes final
org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase.*
org/jboss/test/ws/jaxrpc/jbws124/JBWS124TestCase.*
Modified: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/OrderMgmtBean.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -61,10 +61,21 @@
@PostConstruct
public void initialize()
{
- verificationPort = verificationService.getCCVerificationPort();
- profilePort = profileService.getProfileMgmtPort();
+ // Throws NPE with SUN-RI, use lazy initialize instead
+ //verificationPort = verificationService.getCCVerificationPort();
+ //profilePort = profileService.getProfileMgmtPort();
}
+ public CCVerification getVerificationPort()
+ {
+ return verificationService.getCCVerificationPort();
+ }
+
+ public ProfileMgmt getProfilePort()
+ {
+ return profileService.getProfileMgmtPort();
+ }
+
/**
* Prepare a customer order.
* This will verify the billing details (i.e. creditcard)
@@ -81,17 +92,20 @@
// verify billing details
String creditCard = order.getCustomer().getCreditCardDetails();
- Response<Boolean> response = verificationPort.verifyAsync(creditCard);
+ //Response<Boolean> response = getVerificationPort().verifyAsync(creditCard);
+ boolean validCard = getVerificationPort().verify(creditCard);
+
// high value customer discount
DiscountRequest discountRequest = new DiscountRequest(order.getCustomer());
- DiscountResponse discount = profilePort.getCustomerDiscount(discountRequest);
+ DiscountResponse discount = getProfilePort().getCustomerDiscount(discountRequest);
boolean hasDiscount = discount.getDiscount() > 0.00;
log.info("High value customer ? " + hasDiscount);
try
{
- log.info(creditCard + " valid? " + response.get());
+ //log.info(creditCard + " valid? " + response.get());
+ log.info(creditCard + " valid? " + validCard);
}
catch (Exception e)
{
Modified: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerification.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -34,6 +34,6 @@
@WebParam(name = "creditCardNumber", targetNamespace = "")
String creditCardNumber);
- Response<Boolean> verifyAsync(String creditCardNumber);
+ //Response<Boolean> verifyAsync(String creditCardNumber);
}
Modified: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/cc/CCVerificationBean.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -32,7 +32,7 @@
@Stateless
@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.cc.CCVerification", name = "CCVerification")
@WebContext(contextRoot = "/jaxws-samples-retail")
-@HandlerChain(file = "../jaxws-handler.xml")
+//@HandlerChain(file = "../jaxws-handler.xml")
public class CCVerificationBean implements CCVerification
{
Modified: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-07-11 21:51:59 UTC (rev 3854)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/profile/ProfileMgmtBean.java 2007-07-12 13:59:37 UTC (rev 3855)
@@ -30,7 +30,7 @@
@Stateless
@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.retail.profile.ProfileMgmt", name = "ProfileMgmt", serviceName = "ProfileMgmtService")
@WebContext(contextRoot = "/jaxws-samples-retail")
-@HandlerChain(file = "../jaxws-handler.xml")
+//@HandlerChain(file = "../jaxws-handler.xml")
public class ProfileMgmtBean implements ProfileMgmt
{
17 years, 5 months
JBossWS SVN: r3854 - branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-11 17:51:59 -0400 (Wed, 11 Jul 2007)
New Revision: 3854
Added:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java
Log:
Added: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java (rev 0)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextPropertiesDeploymentAspect.java 2007-07-11 21:51:59 UTC (rev 3854)
@@ -0,0 +1,60 @@
+/*
+ * 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.spi.deployment;
+
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * Populate deployment context properties
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class ContextPropertiesDeploymentAspect extends DeploymentAspect
+{
+ // The configured service endpoint servlet
+ private Map<String,String> contextProperties;
+
+ public Map<String, String> getContextProperties()
+ {
+ return contextProperties;
+ }
+
+ public void setContextProperties(Map<String, String> contextProperties)
+ {
+ this.contextProperties = contextProperties;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ Iterator<String> it = contextProperties.keySet().iterator();
+ while (it.hasNext())
+ {
+ String key = it.next();
+ String value = contextProperties.get(key);
+ dep.getContext().setProperty(key, value);
+ }
+ }
+}
\ No newline at end of file
17 years, 5 months
JBossWS SVN: r3853 - in branches/tdiesler/trunk: integration/native/src/main/java/org/jboss/wsf/stack/jbws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-07-11 17:51:39 -0400 (Wed, 11 Jul 2007)
New Revision: 3853
Removed:
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
Log:
Modified: branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -40,16 +40,14 @@
*/
public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
{
- private String servletClass;
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
@Override
public void create(Deployment dep)
{
+ String propKey = "SERVICE_ENDPOINT_SERVLET";
+ String servletClass = (String)dep.getContext().getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " + propKey);
+
WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
if (webMetaData != null)
{
Modified: branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -69,22 +69,25 @@
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployement info");
- URL warURL = udi.webappURL;
-
- log.debug("publishServiceEndpoint: " + warURL);
- try
+ if (dep.getType().toString().endsWith("EJB21") || dep.getType().toString().endsWith("EJB3"))
{
- webXMLRewriter.rewriteWebXml(dep);
- org.jboss.deployers.client.spi.Deployment deployment = createDeploymentContext(warURL);
+ URL warURL = udi.webappURL;
- mainDeployer.deploy(deployment);
+ log.debug("publishServiceEndpoint: " + warURL);
+ try
+ {
+ webXMLRewriter.rewriteWebXml(dep);
+ org.jboss.deployers.client.spi.Deployment deployment = createDeploymentContext(warURL);
- deploymentMap.put(warURL.toExternalForm(), deployment);
+ mainDeployer.deploy(deployment);
+
+ deploymentMap.put(warURL.toExternalForm(), deployment);
+ }
+ catch (Exception ex)
+ {
+ WSDeploymentException.rethrow(ex);
+ }
}
- catch (Exception ex)
- {
- WSDeploymentException.rethrow(ex);
- }
}
public void destroy(Deployment dep)
Deleted: branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -1,89 +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.stack.jbws;
-
-//$Id: UnifiedMetaDataAssociationDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * A deployer that assigns the EndpointMetaData to the Endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataAssociationDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
- if (umd == null)
- throw new IllegalStateException("Cannot obtain unified meta data");
-
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
- if (sepMetaData == null)
- {
- sepMetaData = getEndpointMetaData(umd, ep);
- sepMetaData.setEndpoint(ep);
-
- ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
-
- String targetBean = ep.getTargetBeanName();
- if (targetBean != null)
- sepMetaData.setServiceEndpointImplName(targetBean);
- }
- }
- }
-
- private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
- {
- String epName = ep.getShortName();
-
- ServerEndpointMetaData epMetaData = null;
- for (ServiceMetaData serviceMetaData : umd.getServices())
- {
- for (EndpointMetaData aux : serviceMetaData.getEndpoints())
- {
- String linkName = ((ServerEndpointMetaData)aux).getLinkName();
- if (epName.equals(linkName))
- {
- epMetaData = (ServerEndpointMetaData)aux;
- break;
- }
- }
- }
-
- if (epMetaData == null)
- throw new IllegalStateException("Cannot find endpoint meta data for: " + epName);
-
- return epMetaData;
- }
-}
\ No newline at end of file
Modified: branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -26,9 +26,13 @@
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
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.JAXRPCDeployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
@@ -78,5 +82,45 @@
dep.getContext().addAttachment(UnifiedMetaData.class, umd);
}
+
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ ServerEndpointMetaData sepMetaData = ep.getAttachment(ServerEndpointMetaData.class);
+ if (sepMetaData == null)
+ {
+ sepMetaData = getEndpointMetaData(umd, ep);
+ sepMetaData.setEndpoint(ep);
+
+ ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
+
+ String targetBean = ep.getTargetBeanName();
+ if (targetBean != null)
+ sepMetaData.setServiceEndpointImplName(targetBean);
+ }
+ }
}
+
+ private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
+ {
+ String epName = ep.getShortName();
+
+ ServerEndpointMetaData epMetaData = null;
+ for (ServiceMetaData serviceMetaData : umd.getServices())
+ {
+ for (EndpointMetaData aux : serviceMetaData.getEndpoints())
+ {
+ String linkName = ((ServerEndpointMetaData)aux).getLinkName();
+ if (epName.equals(linkName))
+ {
+ epMetaData = (ServerEndpointMetaData)aux;
+ break;
+ }
+ }
+ }
+
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot find endpoint meta data for: " + epName);
+
+ return epMetaData;
+ }
}
\ No newline at end of file
Modified: branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-11 21:51:39 UTC (rev 3853)
@@ -171,7 +171,8 @@
The container deployment aspects
-->
<bean name="WSClassLoaderInjectionDeploymentAspect" class="org.jboss.wsf.container.jboss50.ClassLoaderInjectionDeploymentAspect">
- <property name="provides">AssociatedClassLoader</property>
+ <property name="requires">AllowClassLoaderInjection</property>
+ <property name="provides">ContainerClassLoader</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -180,18 +181,13 @@
</bean>
<bean name="WSContextRootDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
- <property name="provides">ContextRoot</property>
<property name="requires">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <property name="provides">ContextRoot</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointHandlerDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
@@ -211,7 +207,7 @@
</bean>
<bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
- <property name="requires">RegisteredEndpoint,PublishedContract</property>
+ <property name="requires">LAST_DEPLOYMENT_ASPECT</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -229,6 +225,7 @@
</bean>
<bean name="WSEndpointNameDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
@@ -238,8 +235,8 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property name="provides">RegisteredEndpoint</property>
<property name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property name="provides">RegisteredEndpoint</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -248,8 +245,7 @@
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContainerMetaData</property>
- <property name="servletClass"><inject bean="WSWebAppDesciptorModifier" property="servletClass"/></property>
+ <property name="requires">ContextProperties</property>
<install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
<parameter>
<this/>
@@ -259,38 +255,28 @@
<bean name="WSUnifiedDeploymentInfoDeploymentAspect" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
<property name="provides">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
- <property name="provides">URLPattern</property>
<property name="requires">ContextRoot, ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <property name="provides">URLPattern</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebAppDeploymentAspect">
- <property name="requires">WebMetaData</property>
+ <property name="requires">WebMetaData, ContextProperties</property>
<property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
@@ -298,24 +284,22 @@
</bean>
<bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
- <property name="provides">WebMetaData</property>
<property name="requires">URLPattern</property>
+ <property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
<property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
</bean>
- <!-- Deployer helper beans -->
+ <!-- Deployment aspect helper beans -->
<bean name="WSEndpointMetrics" class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl">
- <property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
- </bean>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
<bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
<property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
Modified: branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-11 21:51:39 UTC (rev 3853)
@@ -39,9 +39,28 @@
<!--
The stack specific deployment aspects
-->
+ <bean name="WSNativeContextPropertiesDeploymentAspect" 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>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
+ </map>
+ </property>
+ <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
<bean name="WSNativeEagerInitializeDeploymentAspect" class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
+ <property name="requires">ContainerClassLoader,UnifiedMetaDataModel</property>
<property name="provides">InitializedMetaDataModel</property>
- <property name="requires">AssociatedClassLoader</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -67,6 +86,7 @@
</bean>
<bean name="WSNativeEventingDeploymentAspect" class="org.jboss.wsf.stack.jbws.EventingDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -75,6 +95,7 @@
</bean>
<bean name="WSNativePublishContractDeploymentAspect" class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<property name="provides">PublishedContract</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
@@ -84,6 +105,7 @@
</bean>
<bean name="WSNativeServiceEndpointInvokerDeploymentAspect" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
@@ -91,33 +113,14 @@
</install>
</bean>
- <bean name="WSNativeUnifiedMetaDataAssociationDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
- </bean>
-
<bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="provides">UnifiedMetaDataModel</property>
- <property name="requires">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE" method="addDeploymentAspect">
+ <property name="requires">ContainerMetaData, URLPattern</property>
+ <property name="provides">UnifiedMetaDataModel, AllowClassLoaderInjection</property>
+ <install bean="WSMainDeploymentAspectManager" method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB" method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
</deployment>
Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -91,8 +91,20 @@
}
}
+ // Add LAST_DEPLOYMENT_ASPECT
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
if (allAspects.size() != 0)
- throw new IllegalStateException("Cannot sort");
+ throw new IllegalStateException("Cannot sort: " + allAspects);
for (DeploymentAspect aspect : sortedAspects)
log.info(name + ": " + aspect);
@@ -139,7 +151,11 @@
for (int i = 0; i < getDeploymentAspects().size(); i++)
{
DeploymentAspect aspect = getDeploymentAspects().get(i);
- if (providedConditions.containsAll(aspect.getRequiresAsSet()) == false)
+
+ // Check that all required aspects are met
+ Set<String> requiredSet = aspect.getRequiresAsSet();
+ requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
+ if (providedConditions.containsAll(requiredSet) == false)
throw new IllegalStateException("Required conditions '" + aspect.getRequires() + "' not satisfied by '" + providedConditions + "' for: " + aspect);
logInvocation(aspect, "Create");
Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -33,6 +33,8 @@
*/
public interface DeploymentAspectManager
{
+ static final String LAST_DEPLOYMENT_ASPECT = "LAST_DEPLOYMENT_ASPECT";
+
/** Get the name for this aspect manager */
String getName();
Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -40,7 +40,7 @@
public void create(Deployment dep)
{
String contextRoot = dep.getService().getContextRoot();
- if (contextRoot.startsWith("/") == false)
+ if (contextRoot == null || contextRoot.startsWith("/") == false)
throw new IllegalStateException("Context root expected to start with leading slash: " + contextRoot);
for (Endpoint ep : dep.getService().getEndpoints())
Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -38,21 +38,13 @@
// logging support
private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
- // The configured service endpoint servlet
- private String servletClass;
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
{
+ String propKey = "SERVICE_ENDPOINT_SERVLET";
+ 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();
Modified: branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
--- branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-11 21:33:09 UTC (rev 3852)
+++ branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-11 21:51:39 UTC (rev 3853)
@@ -22,14 +22,12 @@
// $Id$
package org.jboss.ws.metadata.builder.jaxws;
-import java.util.Map;
-
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -47,7 +45,7 @@
*/
public UnifiedMetaData buildMetaData(Deployment dep, UnifiedDeploymentInfo udi)
{
- if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
+ log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.vfRoot);
@@ -58,23 +56,14 @@
throw new WSException("Deployment class loader not initialized");
// For every bean
- UnifiedWebMetaData webMetaData = (UnifiedWebMetaData)udi.metaData;
- Map<String, String> servletClassMap = webMetaData.getServletClassNames();
- for (String servletName : servletClassMap.keySet())
+ for (Endpoint ep : dep.getService().getEndpoints())
{
- String servletClassName = servletClassMap.get(servletName);
- try
- {
- Class beanClass = udi.classLoader.loadClass(servletClassName);
- JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi, beanClass, servletName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load service endpoint class: " + servletClassName);
- }
+ String shortName = ep.getShortName();
+ Class beanClass = ep.getTargetBeanClass();
+ JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi, beanClass, shortName);
}
-
- if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
+
+ log.debug("END buildMetaData: " + wsMetaData);
return wsMetaData;
}
catch (RuntimeException rte)
17 years, 5 months