[jboss-cvs] JBossAS SVN: r82446 - in branches/Branch_5_0: component-matrix and 11 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Dec 19 11:00:49 EST 2008
Author: richard.opalka at jboss.com
Date: 2008-12-19 11:00:48 -0500 (Fri, 19 Dec 2008)
New Revision: 82446
Added:
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java
Removed:
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/BareWSFRuntime.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java
branches/Branch_5_0/webservices/src/resources/jbossws-jboss50-container.jar/
branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator
branches/Branch_5_0/webservices/src/scripts/assembly-container.xml
branches/Branch_5_0/webservices/src/scripts/jbossws-deploy-macros.xml
Modified:
branches/Branch_5_0/build/build-distr.xml
branches/Branch_5_0/build/build.xml
branches/Branch_5_0/component-matrix/pom.xml
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java
branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java
branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
Log:
[JBAS-6340][JBAS-6195] svn merge -r 82369:82442 https://svn.jboss.org/repos/jbossas/branches/ropalka-jbossws305-jboss501
Modified: branches/Branch_5_0/build/build-distr.xml
===================================================================
--- branches/Branch_5_0/build/build-distr.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/build/build-distr.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1581,36 +1581,158 @@
<property name="_module.name" value="webservices" override="true"/>
<property name="_module.output" override="true" value="${project.root}/${_module.name}/output"/>
- <!-- Copy the generated client libraries -->
- <mkdir dir="${install.client}"/>
- <copy todir="${install.client}" filtering="no">
+ <available classname="java.io.Console" property="BUILT_ON_JDK6_AND_ABOVE"/>
+ <antcall target="extract-jbossws-resources"/>
+ <antcall target="install-jbossws-to-bin"/>
+ <antcall target="install-jbossws-to-client"/>
+ <antcall target="install-jbossws-to-endorsed"/>
+ <antcall target="install-jbossws-to-common-lib"/>
+ <antcall target="install-jbossws-to-deploy"/>
+ <antcall target="install-jbossws-to-deployers"/>
+ </target>
+
+ <target name="extract-jbossws-resources">
+ <delete dir="${_module.output}/jbossws-native-resources"/>
+ <mkdir dir="${_module.output}/jbossws-native-resources"/>
+ <unzip
+ src="${org.jboss.ws.native.lib}/jbossws-native-resources.jar"
+ dest="${_module.output}/jbossws-native-resources"
+ />
+ </target>
+
+ <target name="install-jbossws-to-bin">
+ <!-- Install JBossWS batch scripts -->
+ <copy todir="${install.bin}" flatten="true" overwrite="true">
+ <fileset dir="${_module.output}/jbossws-native-resources/bin">
+ <include name="wsconsume.bat"/>
+ <include name="wsconsume.sh"/>
+ <include name="wsprovide.bat"/>
+ <include name="wsprovide.sh"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.bat"/>
+ <include name="wstools.sh"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="install-jbossws-to-client">
+ <!-- Install JBossWS jars to client directory -->
+ <copy todir="${install.client}" flatten="true" overwrite="true">
<fileset dir="${_module.output}/lib">
<include name="jbossws-jboss50.jar"/>
</fileset>
+ <fileset dir="${org.jboss.ws.native.lib}">
+ <include name="jbossws-native-client.jar"/>
+ <include name="jbossws-native-core.jar"/>
+ <include name="jbossws-native-jaxrpc.jar"/>
+ <include name="jbossws-native-jaxws-ext.jar"/>
+ <include name="jbossws-native-jaxws.jar"/>
+ <include name="jbossws-native-saaj.jar"/>
+ </fileset>
+ <fileset dir="${org.jboss.ws.lib}">
+ <include name="jbossws-common.jar"/>
+ <include name="jbossws-framework.jar"/>
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ <fileset dir="${sun.fi.lib}">
+ <include name="FastInfoset.jar"/>
+ </fileset>
+ <fileset dir="${org.codehaus.jettison.lib}">
+ <include name="jettison.jar"/>
+ </fileset>
+ <fileset dir="${sun.jaxb.lib}">
+ <include name="jaxb-api.jar"/>
+ </fileset>
+ <fileset dir="${stax.api.lib}">
+ <include name="stax-api.jar"/>
+ </fileset>
</copy>
-
- <!-- Install jbossws.deployer, which is stack agnostic but container dependent -->
- <mkdir dir="${install.all.deployers}/jbossws.deployer"/>
- <unzip dest="${install.all.deployers}/jbossws.deployer" src="${_module.output}/lib/jbossws-jboss50-deployer.zip"/>
+ </target>
- <!-- Copy jbossws container beans to deploy directory -->
- <copy todir="${install.all.deployers}/jbossws.deployer/META-INF" file="${_module.output}/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-jboss-beans.xml"/>
+ <target name="install-jbossws-to-endorsed" if="BUILT_ON_JDK6_AND_ABOVE">
+ <!-- Endorse JBossWS jars on JDK1.6 and above -->
+ <copy todir="${install.lib}/endorsed" flatten="true" overwrite="true">
+ <fileset dir="${org.jboss.ws.native.lib}">
+ <include name="jbossws-native-jaxrpc.jar"/>
+ <include name="jbossws-native-jaxws.jar"/>
+ <include name="jbossws-native-jaxws-ext.jar"/>
+ <include name="jbossws-native-saaj.jar"/>
+ </fileset>
+ </copy>
+ </target>
- <delete dir="${_module.output}/jbossws-native-resources"/>
- <mkdir dir="${_module.output}/jbossws-native-resources"/>
- <unzip dest="${_module.output}/jbossws-native-resources" src="${org.jboss.ws.native.lib}/jbossws-native-resources.jar"/>
+ <target name="install-jbossws-to-common-lib">
+ <!-- Install JBossWS jars to common/lib directory -->
+ <copy todir="${install.common.lib}" flatten="true" overwrite="true">
+ <fileset dir="${org.jboss.ws.native.lib}">
+ <include name="jbossws-native-jaxrpc.jar"/>
+ <include name="jbossws-native-jaxws.jar"/>
+ <include name="jbossws-native-jaxws-ext.jar"/>
+ <include name="jbossws-native-saaj.jar"/>
+ </fileset>
+ <fileset dir="${org.jboss.ws.lib}">
+ <include name="jbossws-common.jar"/>
+ <include name="jbossws-framework.jar"/>
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ </copy>
+ </target>
- <!-- Delegate to the jbossws deploy macros for stack specific deployments -->
- <!--ant antfile="${_module.output}/jbossws-native-resources/resources/jbossws-deploy-macros.xml" target="deploy-jbossws-native50" inheritall="false"-->
- <ant antfile="${project.root}/${_module.name}/src/scripts/jbossws-deploy-macros.xml" target="deploy-jbossws-native50" inheritall="false">
- <property name="installserver" value="${install.all}"/>
- <property name="artifactsdir" value="${_module.output}/jbossws-native-resources"/>
- <property name="thirdpartydir" value="${project.root}/thirdparty"/>
- <property name="jbossid" value="jboss501"/>
- </ant>
-
+ <target name="install-jbossws-to-deploy">
+ <!-- Install JBossWS web console to deploy directory -->
+ <mkdir dir="${install.all.deploy}/jbossws.sar"/>
+ <unzip
+ src="${org.jboss.ws.native.lib}/jbossws-native-management.war"
+ dest="${install.all.deploy}/jbossws.sar/jbossws-management.war"
+ />
</target>
+ <target name="install-jbossws-to-deployers">
+ <!-- Install JBossWS deployers, runtime jars and configs -->
+ <mkdir dir="${install.all.deployers}/jbossws.deployer"/>
+ <unzip dest="${install.all.deployers}/jbossws.deployer" src="${_module.output}/lib/jbossws-jboss50-deployer.zip"/>
+ <copy todir="${install.all.deployers}/jbossws.deployer" flatten="true" overwrite="true">
+ <fileset dir="${sun.fi.lib}">
+ <include name="FastInfoset.jar"/>
+ </fileset>
+ <fileset dir="${jboss.jaxbintros.lib}">
+ <include name="jboss-jaxb-intros.jar"/>
+ </fileset>
+ <fileset dir="${org.jboss.ws.native.lib}">
+ <include name="jbossws-native-core.jar"/>
+ </fileset>
+ <fileset dir="${org.codehaus.jettison.lib}">
+ <include name="jettison.jar"/>
+ </fileset>
+ <fileset dir="${wscommons.policy.lib}">
+ <include name="policy.jar"/>
+ </fileset>
+ <fileset dir="${ibm.wsdl4j.lib}">
+ <include name="wsdl4j.jar"/>
+ </fileset>
+ <fileset dir="${xml.security.lib}">
+ <include name="xmlsec.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${install.all.deployers}/jbossws.deployer">
+ <fileset dir="${_module.output}/jbossws-native-resources/resources/jbossws-jboss501/jbossws.beans">
+ <include name="META-INF/**"/>
+ </fileset>
+ </copy>
+ <copy todir="${install.all.deployers}/jbossws.deployer/META-INF">
+ <fileset dir="${_module.output}/jbossws-native-resources/resources">
+ <include name="standard-*-config.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${install.all.deployers}/jbossws.deployer" flatten="true" overwrite="true">
+ <fileset dir="${org.jboss.ws.lib}">
+ <include name="jbossws-common.jar"/>
+ <include name="jbossws-framework.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
<target name="_module-webservices-all" depends="_module-webservices-most">
<!-- Copy the generated javadocs -->
<mkdir dir="${install.api}/${_module.name}"/>
Modified: branches/Branch_5_0/build/build.xml
===================================================================
--- branches/Branch_5_0/build/build.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/build/build.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -915,12 +915,6 @@
<include name="jboss-remoting.jar"/>
<include name="jboss-security-spi.jar"/>
<include name="jboss-serialization.jar"/>
- <!-- Do not include, otherwise jbossws cannot be a drop in replacement.
- <include name="jboss-xml-binding.jar"/>
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jboss-saaj.jar"/>
- <include name="wsdl4j.jar"/> -->
<include name="jmx-connector-client-factory.jar"/>
<include name="namespace.jar"/>
<include name="xmlsec.jar"/>
Modified: branches/Branch_5_0/component-matrix/pom.xml
===================================================================
--- branches/Branch_5_0/component-matrix/pom.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/component-matrix/pom.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -33,10 +33,10 @@
<version.jboss.jbossts>4.4.0.GA</version.jboss.jbossts>
<version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
<version.jboss.jaxr>1.2.1.GA</version.jboss.jaxr>
- <version.jboss.jbossws>3.0.4.SP1</version.jboss.jbossws>
- <version.jboss.jbossws-common>1.0.7.GA</version.jboss.jbossws-common>
- <version.jboss.jbossws-framework>3.0.4.GA</version.jboss.jbossws-framework>
- <version.jboss.jbossws-spi>1.0.6.GA</version.jboss.jbossws-spi>
+ <version.jboss.jbossws>3.0.5.GA</version.jboss.jbossws>
+ <version.jboss.jbossws-common>1.0.8.GA</version.jboss.jbossws-common>
+ <version.jboss.jbossws-framework>3.0.5.GA</version.jboss.jbossws-framework>
+ <version.jboss.jbossws-spi>1.0.7.GA</version.jboss.jbossws-spi>
<version.jboss.messaging>1.4.1.GA</version.jboss.messaging>
<version.jboss.web>2.1.1.GA</version.jboss.web>
<version.org.hibernate>3.3.1.GA</version.org.hibernate>
@@ -79,7 +79,9 @@
<version.oswego-concurrent.concurrent>1.3.4-jboss-update1</version.oswego-concurrent.concurrent>
<version.suffix.org.jboss.javaee>.GA</version.suffix.org.jboss.javaee>
<version.org.springframework>2.5.5</version.org.springframework>
- <version.sun-jaxws>2.1.1</version.sun-jaxws>
+ <version.sun-jaxws>2.1.3</version.sun-jaxws>
+ <version.staxex>2.1.1</version.staxex>
+ <version.streambuffer>2.1.1</version.streambuffer>
<version.sun.jaxb>2.1.9</version.sun.jaxb>
<version.xdoclet>1.2.3</version.xdoclet>
<version.seam.integration>5.0.0.GA</version.seam.integration>
@@ -1948,17 +1950,17 @@
<artifactId>jaxws-tools</artifactId>
<version>${version.sun-jaxws}</version>
</dependency>
-
+
<dependency>
<groupId>sun-jaxws</groupId>
<artifactId>stax-ex</artifactId>
- <version>${version.sun-jaxws}</version>
+ <version>${version.staxex}</version>
</dependency>
-
+
<dependency>
<groupId>sun-jaxws</groupId>
<artifactId>streambuffer</artifactId>
- <version>${version.sun-jaxws}</version>
+ <version>${version.streambuffer}</version>
</dependency>
<dependency>
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/BareWSFRuntime.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/BareWSFRuntime.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/BareWSFRuntime.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,145 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class BareWSFRuntime implements WSFRuntime
-{
- private static final Logger log = Logger.getLogger(BareWSFRuntime.class);
-
- private String runtimeName;
-
- private DeploymentAspectManager deploymentManager;
-
- private EndpointRegistry endpointRegistry;
-
- private RequestHandlerFactory requestHandlerFactory;
-
- private InvocationHandlerFactory invocationHandlerFactory;
-
- private TransportManagerFactory transportManagerFactory;
-
- public BareWSFRuntime(String runtimeName)
- {
- this.runtimeName = runtimeName;
- }
-
- // ---------------------------------------------------------------------------------
-
- public void create(Deployment deployment)
- {
- deploymentManager.create(deployment, this);
- }
-
- public void start(Deployment deployment)
- {
- deploymentManager.start(deployment, this);
- }
-
- public void stop(Deployment deployment)
- {
- deploymentManager.stop(deployment, this);
- }
-
- public void destroy(Deployment deployment)
- {
- deploymentManager.destroy(deployment, this);
- }
-
- // ---------------------------------------------------------------------------------
-
- public void setTransportManagerFactory(TransportManagerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> TransportManagerFactory: " + factory);
- this.transportManagerFactory = factory;
- }
-
- public TransportManagerFactory getTransportManagerFactory()
- {
- return this.transportManagerFactory;
- }
-
- public void setEndpointRegistry(EndpointRegistry endpointRegistry)
- {
- assert endpointRegistry!=null;
- log.debug(runtimeName + " -> EndpointRegistry: " + endpointRegistry);
- this.endpointRegistry = endpointRegistry;
- }
-
- public EndpointRegistry getEndpointRegistry()
- {
- return this.endpointRegistry;
- }
-
- public void setDeploymentAspectManager(DeploymentAspectManager deploymentManager)
- {
- assert deploymentManager!=null;
- log.debug(runtimeName + " -> DeploymentAspectManager: " + deploymentManager);
- this.deploymentManager = deploymentManager;
- }
-
- public DeploymentAspectManager getDeploymentAspectManager()
- {
- return this.deploymentManager;
- }
-
- public void setRequestHandlerFactory(RequestHandlerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> RequestHandlerFactory: "+ factory);
- this.requestHandlerFactory = factory;
- }
-
- public RequestHandlerFactory getRequestHandlerFactory()
- {
- return this.requestHandlerFactory;
- }
-
- public void setInvocationHandlerFactory(InvocationHandlerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> InvocationHandlerFactory: "+ factory);
- this.invocationHandlerFactory = factory;
- }
-
- public InvocationHandlerFactory getInvocationHandlerFactory()
- {
- return this.invocationHandlerFactory;
- }
-
- public String toString()
- {
- return this.runtimeName+ ": " + super.toString();
- }
-}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -25,10 +25,7 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
import org.jboss.wsf.spi.deployment.*;
-import org.jboss.wsf.container.jboss50.deployer.DeployerHook;
/**
* An abstract web service deployer.
@@ -43,32 +40,28 @@
// provide logging
protected final Logger log = Logger.getLogger(getClass());
- protected String runtimeName;
- private WSFRuntime wsfRuntime;
-
+ private DeploymentAspectManager deploymentAspectManager;
private DeploymentModelFactory deploymentModelFactory;
- public WSFRuntime getWsfRuntime()
+ protected String deploymentManagerName;
+
+ /** MC provided property **/
+ public void setDeploymentManagerName(String deploymentManagerName)
{
- if(null == wsfRuntime)
+ this.deploymentManagerName = deploymentManagerName;
+ }
+
+ public DeploymentAspectManager getDeploymentAspectManager()
+ {
+ if(null == deploymentAspectManager)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- wsfRuntime = spiProvider.getSPI(WSFRuntimeLocator.class).locateRuntime(runtimeName);
+ deploymentAspectManager = spiProvider.getSPI(DeploymentAspectManagerFactory.class).getDeploymentAspectManager( deploymentManagerName );
}
-
- return wsfRuntime;
- }
- public void setWsfRuntime(WSFRuntime wsfRuntime)
- {
- this.wsfRuntime = wsfRuntime;
+ return deploymentAspectManager;
}
- public void setRuntimeName(String runtimeName)
- {
- this.runtimeName = runtimeName;
- }
-
public DeploymentModelFactory getDeploymentModelFactory()
{
if(null == deploymentModelFactory)
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -21,13 +21,6 @@
*/
package org.jboss.wsf.container.jboss50.deployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-
/**
* An abstract deployer for EJB Endpoints
*
@@ -36,19 +29,4 @@
*/
public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
{
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if(!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- super.deploy(unit); // Calls create
-
- Deployment dep = unit.getAttachment(Deployment.class);
- boolean expectedState = DeploymentState.CREATED == dep.getState() || DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step failed");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -28,7 +28,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.HttpSpec;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
/**
* An abstract deployer for JSE Endpoints
@@ -41,7 +41,7 @@
public boolean isWebServiceDeployment(DeploymentUnit unit)
{
JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- boolean isGenerated = Boolean.TRUE.equals(unit.getAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP));
+ boolean isGenerated = Boolean.TRUE.equals(unit.getAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP));
return webMetaData != null && isGenerated == false;
}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -40,7 +40,7 @@
// provide logging
private static final Logger log = Logger.getLogger(AbstractWebServiceDeployer.class);
- protected List<DeployerHook> deployerHooks = new LinkedList<DeployerHook>();
+ private List<DeployerHook> deployerHooks = new LinkedList<DeployerHook>();
public void addDeployerHook(DeployerHook deployer)
{
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -41,37 +41,30 @@
/**
* An abstract web service deployer.
- * <pre>
- * deploy(unit)
+ *
+ * deploy(unit)
* if(isWebServiceDeployment)
* dep = createDeployment(unit)
- * create(dep)
- * start(dep)
+ * deploy(dep)
*
* undeploy(unit)
* dep = getDeployment(unit)
- * stop(dep)
- * destroy(dep)
- * </pre>
+ * undeploy(dep)
*
* @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.com
- *
* @since 25-Apr-2007
*/
public abstract class ArchiveDeployerHook extends AbstractDeployerHook
{
-
- /**
- * Executes the 'create' step only. <br/>
- * Subclasses need to take care that the 'start' step is executed as well.
- */
+
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
+ if (ignoreDeployment(unit))
+ return;
+
+ if (isWebServiceDeployment(unit))
{
log.debug("deploy: " + unit.getName());
-
Deployment dep = getDeployment(unit);
if (dep == null)
{
@@ -79,22 +72,11 @@
dep.addAttachment(DeploymentUnit.class, unit);
}
- if(Deployment.DeploymentState.UNDEFINED == dep.getState())
- {
- getWsfRuntime().create(dep);
- unit.addAttachment(Deployment.class, dep);
- }
- else
- {
- throw new IllegalArgumentException("Cannot process Deployment in state " + dep.getState() + ": " + dep);
- }
+ getDeploymentAspectManager().deploy(dep);
+ unit.addAttachment(Deployment.class, dep);
}
}
- /**
- * Executes the stop() and destroy() lifecycles
- * @param unit
- */
public void undeploy(DeploymentUnit unit)
{
if (ignoreDeployment(unit))
@@ -104,8 +86,7 @@
if (dep != null)
{
log.debug("undeploy: " + unit.getName());
- getWsfRuntime().stop(dep);
- getWsfRuntime().destroy(dep);
+ getDeploymentAspectManager().undeploy(dep);
}
}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -21,12 +21,9 @@
*/
package org.jboss.wsf.container.jboss50.deployer;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
/**
* A deployer JAXRPC JSE Endpoints
@@ -38,26 +35,6 @@
{
/**
- * Expects the 'create' step to be executed in
- * {@link org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE}
- * and executes the 'start' step.
- *
- */
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- Deployment dep = getDeployment(unit);
- boolean expectedState = DeploymentState.CREATED == dep.getState() || DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step is missing");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
-
- /**
* Get the deployment type this deployer can handle
*/
public Deployment.DeploymentType getDeploymentType()
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -45,11 +45,6 @@
public class JAXRPCDeployerHookPreJSE extends AbstractDeployerHookJSE
{
- public void undeploy(DeploymentUnit unit)
- {
- // the JAXRPCDeployerHookPostJSE deals with undeployments
- }
-
/** Get the deployemnt type this deployer can handle
*/
public DeploymentType getDeploymentType()
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -22,10 +22,8 @@
package org.jboss.wsf.container.jboss50.deployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
/**
* @author Heiko.Braun at jboss.com
@@ -34,26 +32,6 @@
{
/**
- * Expects the 'create' step to be executed in
- * {@link org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE} and
- * executes the 'start' step.
- *
- */
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- Deployment dep = getDeployment(unit);
- boolean expectedState = DeploymentState.CREATED == dep.getState() || DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step failed");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
-
- /**
* Get the deployment type this deployer can handle
*/
public Deployment.DeploymentType getDeploymentType()
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -46,12 +46,6 @@
public class JAXWSDeployerHookPreJSE extends AbstractDeployerHookJSE
{
-
- public void undeploy(DeploymentUnit unit)
- {
- // the JAXWSDeployerHookPostJSE deals with undeployment
- }
-
/** Get the deployment type this deployer can handle
*/
public DeploymentType getDeploymentType()
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -23,7 +23,7 @@
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
@@ -36,7 +36,7 @@
*/
public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
{
- public void start(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
// EJB3 endpoints
if (dep.getAttachment(WebServiceDeployment.class) != null)
@@ -53,6 +53,11 @@
{
JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
ClassLoader classLoader = webMetaData.getContextLoader();
+ if (classLoader == null)
+ {
+ // [JBWS-2246] hack for .sar deployments incorporating web services deployments on AS bootstrap.
+ classLoader = dep.getInitialClassLoader();
+ }
dep.setRuntimeClassLoader(classLoader);
}
else
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -30,7 +30,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.transport.HttpSpec;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
import java.net.URL;
@@ -80,7 +80,7 @@
if (dep instanceof ArchiveDeployment)
{
URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
- dep.setProperty(HttpSpec.PROPERTY_WEBAPP_URL, webURL);
+ dep.setProperty(WebMetaDataModifier.PROPERTY_WEBAPP_URL, webURL);
}
}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -24,7 +24,6 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that builds the UnifiedDeploymentInfo
@@ -42,7 +41,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
if (unit == null)
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -24,7 +24,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that modifies the web.xml meta data
@@ -42,7 +41,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
try
{
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -31,5 +31,11 @@
*/
public interface WebMetaDataModifier
{
+ final static String PROPERTY_GENERATED_WEBAPP = "org.jboss.ws.generated.webapp";
+ final static String PROPERTY_WEBAPP_CONTEXT_PARAMETERS = "org.jboss.ws.webapp.ContextParameterMap";
+ final static String PROPERTY_WEBAPP_SERVLET_CLASS = "org.jboss.ws.webapp.ServletClass";
+ final static String PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER = "org.jboss.ws.webapp.ServletContextListener";
+ final static String PROPERTY_WEBAPP_URL = "org.jboss.ws.webapp.url";
+
RewriteResults modifyMetaData(Deployment dep) throws ClassNotFoundException;
}
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -28,7 +28,6 @@
import org.jboss.metadata.web.spec.ListenerMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.HttpSpec;
import javax.xml.ws.WebServiceException;
import java.util.ArrayList;
@@ -72,11 +71,11 @@
{
RewriteResults results = new RewriteResults();
- String servletClass = (String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+ String servletClass = (String)dep.getProperty(PROPERTY_WEBAPP_SERVLET_CLASS);
if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " + HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+ throw new IllegalStateException("Cannot obtain context property: " + PROPERTY_WEBAPP_SERVLET_CLASS);
- Map<String, String> depCtxParams = (Map<String, String>)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
+ Map<String, String> depCtxParams = (Map<String, String>)dep.getProperty(PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
if (depCtxParams != null)
{
List<ParamValueMetaData> contextParams = jbwmd.getContextParams();
@@ -95,7 +94,7 @@
}
}
- String listenerClass = (String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
+ String listenerClass = (String)dep.getProperty(PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
if (listenerClass != null)
{
List<ListenerMetaData> listeners = jbwmd.getListeners();
@@ -118,16 +117,6 @@
servlet.setInitParam(initParams);
}
- if (servlet.getLoadOnStartup() <= 0)
- {
- // [JBWS-2246] hack. We need to start all webservice endpoint servlets because of
- // wsdl-publish-location feature. This feature generates wsdl to specified file
- // location on the FS. Without starting the servlets the WSDL will not be published
- // because publish wsdl deployment aspect is now called in endpoint init servlet
- // lifecycle method and not in the deployers chain as it was in AS 4.x series.
- servlet.setLoadOnStartup(1);
- }
-
String linkName = servlet.getServletName();
// find the servlet-class
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -26,6 +26,8 @@
import javax.xml.ws.WebServiceContext;
import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.common.javax.JavaxAnnotationHelper;
+import org.jboss.wsf.common.javax.PreDestroyHolder;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -39,6 +41,7 @@
* Handles invocations on JSE endpoints.
*
* @author Thomas.Diesler at jboss.org
+ * @author richard.opalka at jboss.com
* @since 25-Apr-2007
*/
public class InvocationHandlerJSE extends InvocationHandler
@@ -61,7 +64,7 @@
{
}
- protected Object getTargetBean(Endpoint ep, Invocation epInv)
+ protected Object getTargetBean(Endpoint ep, Invocation epInv) throws Exception
{
InvocationContext invCtx = epInv.getInvocationContext();
Object targetBean = invCtx.getTargetBean();
@@ -69,7 +72,7 @@
{
try
{
- Class epImpl = ep.getTargetBeanClass();
+ Class<?> epImpl = ep.getTargetBeanClass();
targetBean = epImpl.newInstance();
invCtx.setTargetBean(targetBean);
}
@@ -77,10 +80,14 @@
{
throw new IllegalStateException("Cannot get target bean instance", ex);
}
+
+ JavaxAnnotationHelper.callPostConstructMethod(targetBean, targetBean.getClass().getClassLoader());
+ ep.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
}
+
return targetBean;
}
-
+
public void invoke(Endpoint ep, Invocation epInv) throws Exception
{
try
@@ -105,13 +112,13 @@
}
}
- protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+ protected Method getImplMethod(Class<?> implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
{
String methodName = seiMethod.getName();
- Class[] paramTypes = seiMethod.getParameterTypes();
+ Class<?>[] paramTypes = seiMethod.getParameterTypes();
for (int i = 0; i < paramTypes.length; i++)
{
- Class paramType = paramTypes[i];
+ Class<?> paramType = paramTypes[i];
if (JavaUtils.isPrimitive(paramType) == false)
{
String paramTypeName = paramType.getName();
Modified: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -23,6 +23,7 @@
import org.jboss.wsf.spi.invocation.*;
+import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
/**
@@ -35,7 +36,11 @@
{
ExtensibleWebServiceContext context = null;
- if(type.toString().indexOf("EJB")!=-1 || type.toString().indexOf("MDB")!=-1)
+ //checking for a provided WebServiceContext in the MessageContext; to be removed after EJBTHREE-1604
+ WebServiceContext providedContext = (WebServiceContext)messageContext.get(WebServiceContext.class.toString());
+ if (providedContext != null)
+ context = new WebServiceContextDelegate(providedContext);
+ else if(type.toString().indexOf("EJB")!=-1 || type.toString().indexOf("MDB")!=-1)
context = new WebServiceContextEJB(messageContext);
else
context = new WebServiceContextJSE(messageContext);
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.Protocol;
-
-/**
- * Used with MC
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class BareTransportManagerFactory implements TransportManagerFactory
-{
-
- private TransportManager httpTransport;
-
-
- public void setHttpTransport(TransportManager httpTransport)
- {
- this.httpTransport = httpTransport;
- }
-
- public TransportManager createTransportManager(Protocol protocol)
- {
- TransportManager manager = null;
-
- switch(protocol)
- {
- case HTTP:
- manager = httpTransport;
- break;
- default:
- throw new IllegalArgumentException("No TransportManager for protocol: " + protocol);
- }
-
- return manager;
- }
-}
-
Copied: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java (from rev 82442, branches/ropalka-jbossws305-jboss501/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java)
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java (rev 0)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.transport;
+
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * A HTTP Server that uses DeploymentAspects
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 07-Jul-2006
+ */
+public class DeploymentAspectHttpServer extends AbstractExtensible implements HttpServer
+{
+ /** Start an instance of this HTTP server */
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Create an HTTP context */
+ public HttpContext createContext(String contextRoot)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ return httpContext;
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+
+ try
+ {
+ // Get the deployment model factory
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+
+ // Create/Setup the deployment
+ Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
+ dep.setRuntimeClassLoader(dep.getInitialClassLoader());
+
+ // Create/Setup the service
+ Service service = dep.getService();
+ service.setContextRoot(context.getContextRoot());
+
+ // Create/Setup the endpoint
+ org.jboss.wsf.spi.deployment.Endpoint ep = depModelFactory.newEndpoint(implClass.getName());
+ service.addEndpoint(ep);
+
+ // Deploy using deployment aspects
+ DeploymentAspectManagerFactory depManagerFactory = spiProvider.getSPI(DeploymentAspectManagerFactory.class);
+ DeploymentAspectManager depManager = depManagerFactory.getDeploymentAspectManager("WSDeploymentAspectManagerEndpointAPI");
+ depManager.deploy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ try
+ {
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ private Class getImplementorClass(Endpoint endpoint)
+ {
+ Object implementor = endpoint.getImplementor();
+ Class implClass = (implementor instanceof Class ? (Class)implementor : implementor.getClass());
+ return implClass;
+ }
+}
Copied: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java (from rev 82442, branches/ropalka-jbossws305-jboss501/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java)
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java (rev 0)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.transport;
+
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
+
+/**
+ * Deploy the generated webapp to JBoss
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class DynamicEndpointDeploymentAspect extends DeploymentAspect
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(DynamicEndpointDeploymentAspect.class);
+
+ private DeploymentFactory factory = new DeploymentFactory();
+ private WebMetaDataModifier webMetaDataModifier;
+ private DeployerClient mainDeployer;
+
+ public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
+ {
+ this.webMetaDataModifier = webMetaDataModifier;
+ }
+
+ public void setMainDeployer(DeployerClient mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ public void create(Deployment dep)
+ {
+ JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
+ if (jbwmd == null)
+ throw new WebServiceException("Cannot find web meta data");
+
+ try
+ {
+ webMetaDataModifier.modifyMetaData(dep);
+
+ AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot());
+ MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
+ mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory());
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
+ mainDeployer.deploy(deployment);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ public void destroy(Deployment dep)
+ {
+ try
+ {
+ AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot());
+ mainDeployer.undeploy(deployment);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ private AbstractDeployment createSimpleDeployment(String name)
+ {
+ AbstractDeployment unit = new AbstractDeployment(name);
+ // There is one top level deployment
+ factory.addContext(unit, "");
+ return unit;
+ }
+
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ public void removeClassLoader(DeploymentUnit unit) throws Exception
+ {
+ }
+ }
+}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import org.jboss.logging.Logger;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.TransportSpec;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Creates a webapp dpeloyment and pushes it into the deployment framework
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class EJBHttpTransportManager implements TransportManager
-{
- private static Logger log = Logger.getLogger(EJBHttpTransportManager.class);
- private static final String PROCESSED_BY_DEPLOYMENT_FACTORY = "processed.by.deployment.factory";
- private WebAppDeploymentFactory deploymentFactory;
- private WebAppGenerator generator;
- private Map<String, Deployment> deploymentRegistry = new HashMap<String, Deployment>();
-
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
-
- assert deploymentFactory!=null;
- assert generator!=null;
-
- // Resolve the endpoint address
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- // Create JBossWebMetaData and attach it to the DeploymentUnit
- Deployment topLevelDeployment = endpoint.getService().getDeployment();
-
- // TODO: Somehow the ServletClass and InitParameter need to go from TransportSpec into generator
- topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS, httpSpec.getServletClass());
- topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS, httpSpec.getContextParameter());
-
- // TODO: JBWS-2188
- Boolean alreadyDeployed = (Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed == null) || (false == alreadyDeployed))
- {
- JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
- deploymentFactory.create(topLevelDeployment, jbwMetaData);
- topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
- }
-
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
-
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- ListenerRef listenerRef = null;
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" + hostAndPort + ctx + pattern));
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
-
- // Map listenerRef for destroy phase
- deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
-
- return listenerRef;
- }
-
- public void destroyListener(ListenerRef ref)
- {
- Deployment dep = deploymentRegistry.get(ref.getUUID());
- if (dep != null)
- {
- // TODO: JBWS-2188
- Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed != null) && (true == alreadyDeployed))
- {
- try
- {
- deploymentFactory.destroy(dep);
- }
- catch (Exception e)
- {
- log.error(e.getMessage(), e);
- }
- dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- }
- }
- deploymentRegistry.remove(ref.getUUID());
- }
-
- public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
- {
- this.deploymentFactory = deploymentFactory;
- }
-
- public void setGenerator(WebAppGenerator generator)
- {
- this.generator = generator;
- }
-}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
-import org.jboss.deployers.client.spi.DeployerClient;
-import org.jboss.deployers.client.spi.DeploymentFactory;
-import org.jboss.deployers.spi.attachments.MutableAttachments;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportSpec;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-
-import javax.xml.ws.WebServiceException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class EndpointAPIHttpTransportManager implements TransportManager
-{
- private static Logger log = Logger.getLogger(EndpointAPIHttpTransportManager.class);
- private static final String PROCESSED_BY_DEPLOYMENT_FACTORY = "processed.by.deployment.factory";
- private WebAppGenerator generator;
- private DeploymentFactory factory = new DeploymentFactory();
-
- private WebMetaDataModifier webMetaDataModifier;
- private DeployerClient mainDeployer;
-
- private Map<String, Deployment> deploymentRegistry = new HashMap<String, Deployment>();
-
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
- assert generator!=null;
- assert webMetaDataModifier!=null;
-
- // Resolve the endpoint address
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- // Create JBossWebMetaData and attach it to the DeploymentUnit
- Deployment topLevelDeployment = endpoint.getService().getDeployment();
-
- // Pass on to the main deployer
- Boolean alreadyDeployed = (Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed == null) || (false == alreadyDeployed))
- {
- generator.create(topLevelDeployment);
- deploy(topLevelDeployment);
- topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
- }
-
-
- // Server config
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- ListenerRef listenerRef = null;
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" + hostAndPort + ctx + pattern));
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
-
- // Map listenerRef for destroy phase
- deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
-
- return listenerRef;
- }
-
- public void destroyListener(ListenerRef ref)
- {
- Deployment dep = deploymentRegistry.get(ref.getUUID());
- if (dep != null)
- {
- // TODO: JBWS-2188
- Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed != null) && (true == alreadyDeployed))
- {
- try
- {
- undeploy(dep);
- }
- catch (Exception e)
- {
- log.error(e.getMessage(), e);
- }
- dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- }
- }
- deploymentRegistry.remove(ref.getUUID());
- }
-
- public void setGenerator(WebAppGenerator generator)
- {
- this.generator = generator;
- }
-
- public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
- {
- this.webMetaDataModifier = webMetaDataModifier;
- }
-
- public void setMainDeployer(DeployerClient mainDeployer)
- {
- this.mainDeployer = mainDeployer;
- }
-
- private void deploy(Deployment dep)
- {
- JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
- if (jbwmd == null)
- throw new WebServiceException("Cannot find web meta data");
-
- try
- {
- webMetaDataModifier.modifyMetaData(dep);
-
- final AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot());
- MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
- mutableAttachments.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
- mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory());
- mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
- mainDeployer.deploy(deployment);
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
-
- private void undeploy(Deployment dep)
- {
- try
- {
- AbstractDeployment deployment = createSimpleDeployment(dep.getService().getContextRoot());
- mainDeployer.undeploy(deployment);
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
-
- private AbstractDeployment createSimpleDeployment(String name)
- {
- AbstractDeployment unit = new AbstractDeployment(name);
- // There is one top level deployment
- factory.addContext(unit, "");
- return unit;
- }
-
- private static class ContextClassLoaderFactory implements ClassLoaderFactory
- {
- public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
- {
- return Thread.currentThread().getContextClassLoader();
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- }
- }
-}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.TransportSpec;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * TransportManager implementation that doesn't create physical
- * endpoints (ports, etc) but simply constructs a service endpoint address for a given
- * deployment;
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class NoopHttpTransportManager implements TransportManager
-{
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
-
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
-
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- ListenerRef ref = new HttpListenerRef(
- ctx, pattern,
- new URI("http://"+hostAndPort+ctx+pattern)
- );
-
- return ref;
-
- } catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
- }
-
- public void destroyListener(ListenerRef ref)
- {
- // noop
- }
-}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.common.ResourceLoaderAdapter;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.deployment.AbstractExtensible;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.http.HttpContext;
-import org.jboss.wsf.spi.http.HttpContextFactory;
-import org.jboss.wsf.spi.http.HttpServer;
-
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.WebServiceException;
-
-/**
- * A HTTP Server that uses DeploymentAspects
- *
- * @author Thomas.Diesler at jboss.org
- * @since 07-Jul-2006
- */
-public class WSFRuntimeDelegateHttpServer extends AbstractExtensible implements HttpServer
-{
- /** Start an instance of this HTTP server */
- public void start()
- {
- // verify required properties
- }
-
- /** Create an HTTP context */
- public HttpContext createContext(String contextRoot)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- HttpContext httpContext = spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
- return httpContext;
- }
-
- /** Publish an JAXWS endpoint to the HTTP server */
- public void publish(HttpContext context, Endpoint endpoint)
- {
- Class implClass = getImplementorClass(endpoint);
-
- try
- {
- // Get the deployment model factory
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- WSFRuntimeLocator locator = spiProvider.getSPI(WSFRuntimeLocator.class);
- WSFRuntime runtime = locator.locateRuntime("EndpointAPIRuntime");
-
- DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
-
- // Create/Setup the deployment
- Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
- dep.setType(Deployment.DeploymentType.JAXWS_JSE);
- dep.setRuntimeClassLoader(dep.getInitialClassLoader());
-
- // TODO: Hack, should this become another DeploymentAspect?
- ((ArchiveDeployment)dep).setRootFile(new ResourceLoaderAdapter());
-
- // Create/Setup the service
- Service service = dep.getService();
- service.setContextRoot(context.getContextRoot());
-
- // Create/Setup the endpoint
- org.jboss.wsf.spi.deployment.Endpoint ep = depModelFactory.newEndpoint(implClass.getName());
- ep.setShortName(implClass.getName()+"-Endpoint");
- ep.setURLPattern("/*");
- service.addEndpoint(ep);
-
- // Deploy using deployment aspects
- runtime.create(dep);
- runtime.start(dep);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WebServiceException(ex);
- }
- }
-
- /** Destroys an JAXWS endpoint on the HTTP server */
- public void destroy(HttpContext context, Endpoint endpoint)
- {
- try
- {
-
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WebServiceException(ex);
- }
- }
-
- private Class getImplementorClass(Endpoint endpoint)
- {
- Object implementor = endpoint.getImplementor();
- Class implClass = (implementor instanceof Class ? (Class)implementor : implementor.getClass());
- return implClass;
- }
-}
Copied: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java (from rev 82442, branches/ropalka-jbossws305-jboss501/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java)
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java (rev 0)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.transport;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyConfigurationFactory;
+import org.jboss.web.WebPermissionMapping;
+import javax.xml.ws.WebServiceException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
+
+/**
+ * Deploy the generated webapp to JBoss
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Anil.Saldhana at jboss.com
+ * @since 12-May-2006
+ */
+public class WebAppDeploymentAspect extends DeploymentAspect
+{
+ private WebMetaDataModifier webMetaDataModifier;
+
+ public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
+ {
+ this.webMetaDataModifier = webMetaDataModifier;
+ }
+
+ public void create(Deployment dep)
+ {
+ JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
+ if (jbwmd == null)
+ throw new WebServiceException("Cannot find web meta data");
+
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit != null)
+ {
+ try
+ {
+ webMetaDataModifier.modifyMetaData(dep);
+
+ try
+ {
+ generateJACCPermissions(dep.getSimpleName(), jbwmd); // TODO: make it another deployment aspect
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Exception generating JACC perms:",e);
+ }
+
+ // Attaching it to the DeploymentUnit will cause a new webapp deployment
+ unit.addAttachment(JBossWebMetaData.class, jbwmd);
+ unit.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Cannot obtain deployment unit");
+ }
+ }
+
+ /**
+ * JBAS-5935: The dynamic web application generated by the JBossWS
+ * does not go through the war security deployer. Hence the JACC
+ * permissions are not created. There is a need to explicitly create
+ * the war jacc permissions.
+ * @param depName
+ * @param jbwmd
+ * @throws Exception
+ */
+ protected void generateJACCPermissions(String depName, JBossWebMetaData jbwmd)
+ throws Exception
+ {
+ PolicyConfigurationFactory policyConfigurationFactory =
+ PolicyConfigurationFactory.getPolicyConfigurationFactory();
+ PolicyConfiguration policyConfiguration =
+ policyConfigurationFactory.getPolicyConfiguration(depName, false);
+ WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
+ policyConfiguration.commit();
+ }
+}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import javax.security.jacc.PolicyConfiguration;
-import javax.security.jacc.PolicyConfigurationFactory;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.web.WebPermissionMapping;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.transport.HttpSpec;
-
-/**
- * Deploy the generated webapp to JBoss by attaching it
- * to the {@link org.jboss.deployers.structure.spi.DeploymentUnit}
- *
- * @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.com
- * @author Anil.Saldhana at jboss.com
- *
- * @since 12-May-2006
- */
-public class WebAppDeploymentFactory
-{
- private WebMetaDataModifier webMetaDataModifier;
-
- public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
- {
- this.webMetaDataModifier = webMetaDataModifier;
- }
-
- /**
- * Creates and attaches web meta data to a deployment unit
- * @param dep
- * @return a mofified deployment unit
- */
- public DeploymentUnit create(Deployment dep, JBossWebMetaData jbwmd )
- {
- if (jbwmd == null)
- throw new IllegalArgumentException("Web meta data is cannot be null");
-
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit != null)
- {
- try
- {
- webMetaDataModifier.modifyMetaData(dep);
-
-
- //Generate the JACC permissions here
- try
- {
- generateJACCPermissions(dep.getSimpleName(), jbwmd);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Exception generating JACC perms:",e);
- }
-
- // Attaching it to the DeploymentUnit will cause a new webapp deployment
- unit.addAttachment(JBossWebMetaData.class, jbwmd);
- unit.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
-
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
- else
- {
- throw new IllegalStateException("Cannot obtain deployment unit");
- }
-
- return unit;
- }
-
- public void destroy(Deployment dep)
- {
- // nothing to do?
- }
-
- /**
- * JBAS-5935: The dynamic web application generated by the JBossWS
- * does not go through the war security deployer. Hence the JACC
- * permissions are not created. There is a need to explicitly create
- * the war jacc permissions.
- * @param depName
- * @param jbwmd
- * @throws Exception
- */
- protected void generateJACCPermissions(String depName, JBossWebMetaData jbwmd)
- throws Exception
- {
- PolicyConfigurationFactory policyConfigurationFactory =
- PolicyConfigurationFactory.getPolicyConfigurationFactory();
- PolicyConfiguration policyConfiguration =
- policyConfigurationFactory.getPolicyConfiguration(depName, false);
- WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
- policyConfiguration.commit();
- }
-}
Deleted: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,282 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50.transport;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.AuthConstraintMetaData;
-import org.jboss.metadata.web.spec.LoginConfigMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.TransportGuaranteeType;
-import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandler;
-
-/**
- * Generates a webapp for an EJB endpoint
- * which will be process by {@link org.jboss.wsf.container.jboss50.transport.WebAppDeploymentFactory}
- *
- * @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.com
- *
- * @since 13-Oct-2007
- */
-public class WebAppGenerator
-{
- private SecurityHandler securityHandlerEJB21;
- private SecurityHandler securityHandlerEJB3;
-
- public void setSecurityHandlerEJB21(SecurityHandler handler)
- {
- this.securityHandlerEJB21 = handler;
- }
-
- public void setSecurityHandlerEJB3(SecurityHandler handler)
- {
- this.securityHandlerEJB3 = handler;
- }
-
- public JBossWebMetaData create(Deployment dep)
- {
- JBossWebMetaData jbwmd = null;
-
- String typeStr = dep.getType().toString();
- if (typeStr.endsWith("EJB21"))
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB21);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
- else if (typeStr.endsWith("EJB3"))
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB3);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
- else
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, null);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
-
- return jbwmd;
- }
-
- protected JBossWebMetaData generatWebDeployment(ArchiveDeployment dep, SecurityHandler securityHandler)
- {
- JBossWebMetaData jbwmd = new JBossWebMetaData();
- createWebAppDescriptor(dep, jbwmd, securityHandler);
- createJBossWebAppDescriptor(dep, jbwmd, securityHandler);
- return jbwmd;
- }
-
- protected void createWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd, SecurityHandler securityHandler)
- {
- /*
- <servlet>
- <servlet-name>
- <servlet-class>
- </servlet>
- */
- JBossServletsMetaData servlets = jbwmd.getServlets();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- JBossServletMetaData servlet = new JBossServletMetaData();
- servlet.setServletName(ep.getShortName());
- servlet.setServletClass(ep.getTargetBeanName());
- servlets.add(servlet);
- }
-
- /*
- <servlet-mapping>
- <servlet-name>
- <url-pattern>
- </servlet-mapping>
- */
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- List<ServletMappingMetaData> servletMappings = jbwmd.getServletMappings();
- if (servletMappings == null)
- {
- servletMappings = new ArrayList<ServletMappingMetaData>();
- jbwmd.setServletMappings(servletMappings);
- }
- ServletMappingMetaData servletMapping = new ServletMappingMetaData();
- servletMapping.setServletName(ep.getShortName());
- servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
- servletMappings.add(servletMapping);
- }
-
- String authMethod = null;
-
- // Add web-app/security-constraint for each port component
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String ejbName = ep.getShortName();
-
- Boolean secureWSDLAccess = null;
- String transportGuarantee = null;
- String beanAuthMethod = null;
-
- WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- if (anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- if (anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
- }
-
- EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- beanAuthMethod = smd.getAuthMethod();
- transportGuarantee = smd.getTransportGuarantee();
- secureWSDLAccess = smd.getSecureWSDLAccess();
- }
- }
-
- if (beanAuthMethod != null || transportGuarantee != null)
- {
- /*
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>TestUnAuthPort</web-resource-name>
- <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>*</role-name>
- </auth-constraint>
- <user-data-constraint>
- <transport-guarantee>NONE</transport-guarantee>
- </user-data-constraint>
- </security-constraint>
- */
- List<SecurityConstraintMetaData> securityContraints = jbwmd.getSecurityContraints();
- if (securityContraints == null)
- {
- securityContraints = new ArrayList<SecurityConstraintMetaData>();
- jbwmd.setSecurityContraints(securityContraints);
- }
- SecurityConstraintMetaData securityConstraint = new SecurityConstraintMetaData();
- securityContraints.add(securityConstraint);
-
- WebResourceCollectionsMetaData resourceCollections = securityConstraint.getResourceCollections();
- if (resourceCollections == null)
- {
- resourceCollections = new WebResourceCollectionsMetaData();
- securityConstraint.setResourceCollections(resourceCollections);
- }
- WebResourceCollectionMetaData resourceCollection = new WebResourceCollectionMetaData();
- resourceCollections.add(resourceCollection);
-
- resourceCollection.setWebResourceName(ejbName);
- resourceCollection.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
- ArrayList<String> httpMethods = new ArrayList<String>();
- resourceCollection.setHttpMethods(httpMethods);
- if (Boolean.TRUE.equals(secureWSDLAccess))
- {
- httpMethods.add("GET");
- }
- httpMethods.add("POST");
-
- // Optional auth-constraint
- if (beanAuthMethod != null)
- {
- // Only the first auth-method gives the war login-config/auth-method
- if (authMethod == null)
- authMethod = beanAuthMethod;
-
- AuthConstraintMetaData authConstraint = new AuthConstraintMetaData();
- authConstraint.setRoleNames(Arrays.asList(new String[] { "*" }));
- securityConstraint.setAuthConstraint(authConstraint);
- }
- // Optional user-data-constraint
- if (transportGuarantee != null)
- {
- UserDataConstraintMetaData userDataConstraint = new UserDataConstraintMetaData();
- userDataConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(transportGuarantee));
- securityConstraint.setUserDataConstraint(userDataConstraint);
- }
- }
- }
-
- // Optional login-config/auth-method
- if (authMethod != null && securityHandler != null)
- {
- LoginConfigMetaData loginConfig = jbwmd.getLoginConfig();
- if (loginConfig == null)
- {
- loginConfig = new LoginConfigMetaData();
- jbwmd.setLoginConfig(loginConfig);
- }
- loginConfig.setAuthMethod(authMethod);
- loginConfig.setRealmName("EJBServiceEndpointServlet Realm");
-
- securityHandler.addSecurityRoles(jbwmd, dep);
- }
- }
-
- protected void createJBossWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd, SecurityHandler securityHandler)
- {
- /* Create a jboss-web
- <jboss-web>
- <security-domain>java:/jaas/cts</security-domain>
- <context-root>/ws/ejbN/</context-root>
- <virtual-host>some.domain.com</virtual-host>
- </jboss-web>
- */
- if (securityHandler != null)
- securityHandler.addSecurityDomain(jbwmd, dep);
-
- // Get the context root for this deployment
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new WSFDeploymentException("Cannot obtain context root");
-
- jbwmd.setContextRoot(contextRoot);
- String[] virtualHosts = dep.getService().getVirtualHosts();
- if (virtualHosts != null && virtualHosts.length > 0)
- {
- jbwmd.setVirtualHosts(Arrays.asList(virtualHosts));
- }
- }
-}
Copied: branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java (from rev 82442, branches/ropalka-jbossws305-jboss501/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java)
===================================================================
--- branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java (rev 0)
+++ branches/Branch_5_0/webservices/src/main/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java 2008-12-19 16:00:48 UTC (rev 82446)
@@ -0,0 +1,277 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.transport;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandler;
+
+/**
+ * A deployment aspect that generates a webapp for an EJB endpoint
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 13-Oct-2007
+ */
+public class WebAppGeneratorDeploymentAspect extends DeploymentAspect
+{
+ private SecurityHandler securityHandlerEJB21;
+ private SecurityHandler securityHandlerEJB3;
+
+ public void setSecurityHandlerEJB21(SecurityHandler handler)
+ {
+ this.securityHandlerEJB21 = handler;
+ }
+
+ public void setSecurityHandlerEJB3(SecurityHandler handler)
+ {
+ this.securityHandlerEJB3 = handler;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ String typeStr = dep.getType().toString();
+ if (typeStr.endsWith("EJB21"))
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB21);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ else if (typeStr.endsWith("EJB3"))
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB3);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ else
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep, null);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ }
+
+ protected JBossWebMetaData generatWebDeployment(ArchiveDeployment dep, SecurityHandler securityHandler)
+ {
+ JBossWebMetaData jbwmd = new JBossWebMetaData();
+ createWebAppDescriptor(dep, jbwmd, securityHandler);
+ createJBossWebAppDescriptor(dep, jbwmd, securityHandler);
+ return jbwmd;
+ }
+
+ protected void createWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd, SecurityHandler securityHandler)
+ {
+ /*
+ <servlet>
+ <servlet-name>
+ <servlet-class>
+ </servlet>
+ */
+ JBossServletsMetaData servlets = jbwmd.getServlets();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ JBossServletMetaData servlet = new JBossServletMetaData();
+ servlet.setServletName(ep.getShortName());
+ servlet.setServletClass(ep.getTargetBeanName());
+ servlets.add(servlet);
+ }
+
+ /*
+ <servlet-mapping>
+ <servlet-name>
+ <url-pattern>
+ </servlet-mapping>
+ */
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ List<ServletMappingMetaData> servletMappings = jbwmd.getServletMappings();
+ if (servletMappings == null)
+ {
+ servletMappings = new ArrayList<ServletMappingMetaData>();
+ jbwmd.setServletMappings(servletMappings);
+ }
+ ServletMappingMetaData servletMapping = new ServletMappingMetaData();
+ servletMapping.setServletName(ep.getShortName());
+ servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
+ servletMappings.add(servletMapping);
+ }
+
+ String authMethod = null;
+
+ // Add web-app/security-constraint for each port component
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String ejbName = ep.getShortName();
+
+ Boolean secureWSDLAccess = null;
+ String transportGuarantee = null;
+ String beanAuthMethod = null;
+
+ WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
+ if (anWebContext != null)
+ {
+ if (anWebContext.authMethod().length() > 0)
+ beanAuthMethod = anWebContext.authMethod();
+ if (anWebContext.transportGuarantee().length() > 0)
+ transportGuarantee = anWebContext.transportGuarantee();
+ if (anWebContext.secureWSDLAccess())
+ secureWSDLAccess = anWebContext.secureWSDLAccess();
+ }
+
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
+ {
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
+ {
+ beanAuthMethod = smd.getAuthMethod();
+ transportGuarantee = smd.getTransportGuarantee();
+ secureWSDLAccess = smd.getSecureWSDLAccess();
+ }
+ }
+
+ if (beanAuthMethod != null || transportGuarantee != null)
+ {
+ /*
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>TestUnAuthPort</web-resource-name>
+ <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ */
+ List<SecurityConstraintMetaData> securityContraints = jbwmd.getSecurityContraints();
+ if (securityContraints == null)
+ {
+ securityContraints = new ArrayList<SecurityConstraintMetaData>();
+ jbwmd.setSecurityContraints(securityContraints);
+ }
+ SecurityConstraintMetaData securityConstraint = new SecurityConstraintMetaData();
+ securityContraints.add(securityConstraint);
+
+ WebResourceCollectionsMetaData resourceCollections = securityConstraint.getResourceCollections();
+ if (resourceCollections == null)
+ {
+ resourceCollections = new WebResourceCollectionsMetaData();
+ securityConstraint.setResourceCollections(resourceCollections);
+ }
+ WebResourceCollectionMetaData resourceCollection = new WebResourceCollectionMetaData();
+ resourceCollections.add(resourceCollection);
+
+ resourceCollection.setWebResourceName(ejbName);
+ resourceCollection.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
+ ArrayList<String> httpMethods = new ArrayList<String>();
+ resourceCollection.setHttpMethods(httpMethods);
+ if (Boolean.TRUE.equals(secureWSDLAccess))
+ {
+ httpMethods.add("GET");
+ }
+ httpMethods.add("POST");
+
+ // Optional auth-constraint
+ if (beanAuthMethod != null)
+ {
+ // Only the first auth-method gives the war login-config/auth-method
+ if (authMethod == null)
+ authMethod = beanAuthMethod;
+
+ AuthConstraintMetaData authConstraint = new AuthConstraintMetaData();
+ authConstraint.setRoleNames(Arrays.asList(new String[] { "*" }));
+ securityConstraint.setAuthConstraint(authConstraint);
+ }
+ // Optional user-data-constraint
+ if (transportGuarantee != null)
+ {
+ UserDataConstraintMetaData userDataConstraint = new UserDataConstraintMetaData();
+ userDataConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(transportGuarantee));
+ securityConstraint.setUserDataConstraint(userDataConstraint);
+ }
+ }
+ }
+
+ // Optional login-config/auth-method
+ if (authMethod != null && securityHandler != null)
+ {
+ LoginConfigMetaData loginConfig = jbwmd.getLoginConfig();
+ if (loginConfig == null)
+ {
+ loginConfig = new LoginConfigMetaData();
+ jbwmd.setLoginConfig(loginConfig);
+ }
+ loginConfig.setAuthMethod(authMethod);
+ loginConfig.setRealmName("EJBServiceEndpointServlet Realm");
+
+ securityHandler.addSecurityRoles(jbwmd, dep);
+ }
+ }
+
+ protected void createJBossWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd, SecurityHandler securityHandler)
+ {
+ /* Create a jboss-web
+ <jboss-web>
+ <security-domain>java:/jaas/cts</security-domain>
+ <context-root>/ws/ejbN/</context-root>
+ <virtual-host>some.domain.com</virtual-host>
+ </jboss-web>
+ */
+ if (securityHandler != null)
+ securityHandler.addSecurityDomain(jbwmd, dep);
+
+ // Get the context root for this deployment
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ throw new WSFDeploymentException("Cannot obtain context root");
+
+ jbwmd.setContextRoot(contextRoot);
+ String[] virtualHosts = dep.getService().getVirtualHosts();
+ if (virtualHosts != null && virtualHosts.length > 0)
+ {
+ jbwmd.setVirtualHosts(Arrays.asList(virtualHosts));
+ }
+ }
+}
Modified: branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
===================================================================
--- branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,162 +1,354 @@
<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
- xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- *********************************************************************************************************************
- Web Service deployment
-
- There are two deployers registered with the JBoss Main Deployer.
- The order of which is important
-
- 1) EJBDeployer < WebServiceDeployerEJB < WarDeployer
- 2) WebServiceDeployerPreJSE < WarDeployer
- 3) WarDeployer < WebServiceDeployerPostJSE
-
- Each WebServiceDeployer has a number of DeployerHooks registered with it
-
- - WebServiceDeployerEJB
- - WSDeployerHook_JAXRPC_EJB21
- - WSDeployerHook_JAXWS_EJB3
-
- - WebServiceDeployerPreJSE
- - WSDeployerHook_JAXRPC_JSE
- - WSDeployerHook_JAXWS_JSE
-
- 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)
- WSFRuntime.start(dep)
-
- Each deployer hook has a web service WSFRuntime injected into it.
-
- ********************************************************************************************************************* -->
-
- <!--
- A web service deployer that hooks in after the EJB deployers
- -->
- <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB">
- <depends>EJB2xDeployer</depends>
- <depends>Ejb3Deployer</depends>
- </bean>
-
- <!--
- A web service deployer that hooks in before the WAR deployer
- -->
- <bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE">
- <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
- <depends>WebAppParsingDeployer</depends>
- </bean>
-
- <!--
- A web service deployer that hooks in after the WAR deployer
- -->
- <bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE">
- <depends>WarDeployer</depends>
- </bean>
-
- <!--
- Register DeployerHooks with JBoss deployers
- -->
-
- <!-- Phase 1 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPreJSE</depends>
- </bean>
- <!-- Phase 2 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPostJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPostJSE</depends>
- </bean>
-
- <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookEJB21">
- <property name="runtimeName">WebserviceEJBRuntime</property>
- <install bean="WebServiceDeployerEJB" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerEJB</depends>
- </bean>
-
- <!-- Phase 1 of JSE JAX-WS-->
- <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPreJSE</depends>
- </bean>
- <!-- Phase 2 of JSE JAX-WS -->
- <bean name="WSDeployerHook_JAXWS_POST_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPostJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPostJSE</depends>
- </bean>
-
- <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3">
- <property name="runtimeName">WebserviceEJBRuntime</property>
- <install bean="WebServiceDeployerEJB" method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerEJB</depends>
- </bean>
-
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jboss.wsf.spi.util.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
+
+ <!-- Locate the single instance of the MBeanServer -->
+ <bean name="WSMBeanServerLocator" class="org.jboss.wsf.framework.management.MBeanServerLocator">
+ <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ </bean>
+
+ <!-- The HTTPServer used by the JAXWS Endpoint API -->
+ <bean name="WSHTTPServer" class="org.jboss.wsf.container.jboss50.transport.DeploymentAspectHttpServer"/>
+
+ <!-- *********************************************************************************************************************
+ Web Service deployment
+
+ There are two deployers registered with the JBoss Main Deployer.
+ The order of which is important
+
+ 1) EJBDeployer < WebServiceDeployerEJB < WarDeployer
+ 2) WebServiceDeployerPreJSE < WarDeployer
+ 3) WarDeployer < WebServiceDeployerPostJSE
+
+ Each WebServiceDeployer has a number of DeployerHooks registered with it
+
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
+
+ - WebServiceDeployerPreJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
+
+ 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.
+
+ ********************************************************************************************************************* -->
+
+ <!--
+ A web service deployer that hooks in after the EJB deployers
+ -->
+ <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB">
+ <depends>EJB2xDeployer</depends>
+ <depends>Ejb3Deployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in before the WAR deployer
+ -->
+ <bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE">
+ <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ <depends>WebAppParsingDeployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in after the WAR deployer
+ -->
+ <bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE">
+ <depends>WarDeployer</depends>
+ </bean>
+
+ <!--
+ Register DeployerHooks with JBoss deployers
+ -->
+
+ <!-- Phase 1 of JSE JAX-RPC -->
+ <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+ <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPreJSE</depends>
+ </bean>
+ <!-- Phase 2 of JSE JAX-RPC -->
+ <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPostJSE">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+ <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPostJSE</depends>
+ </bean>
+
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookEJB21">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerEJB</property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+
+ <!-- Phase 1 of JSE JAX-WS-->
+ <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+ <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPreJSE</depends>
+ </bean>
+ <!-- Phase 2 of JSE JAX-WS -->
+ <bean name="WSDeployerHook_JAXWS_POST_JSE" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPostJSE">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+ <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPostJSE</depends>
+ </bean>
+
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3">
+ <property name="deploymentManagerName">WSDeploymentAspectManagerEJB</property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+
+ <!--
+ Each DeploymentAspectManger maintains a list of DeploymentAspects
+ -->
+ <bean name="WSDeploymentAspectManagerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="name">WSDeploymentAspectManagerPreJSE</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="parent"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
+ <property name="name">WSDeploymentAspectManagerPostJSE</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="name">WSDeploymentAspectManagerEJB</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerEndpointAPI" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="name">WSDeploymentAspectManagerEndpointAPI</property>
+ </bean>
+
+ <!--
+ The container deployment aspects
+ -->
+ <bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataDeploymentAspect">
+ <property name="provides">ContainerMetaData, VFSRoot</property>
+ </bean>
+
+ <bean name="WSContextRootDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContextRoot</property>
+ </bean>
+
+ <bean name="WSVirtualHostDeploymentAspect" class="org.jboss.wsf.framework.deployment.VirtualHostDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">VirtualHosts</property>
+ </bean>
+
+ <bean name="WSDynamicEndpointDeploymentAspect" class="org.jboss.wsf.container.jboss50.transport.DynamicEndpointDeploymentAspect">
+ <property name="requires">WebMetaData, ContextProperties</property>
+ <property name="webMetaDataModifier"><inject bean="WSWebMetaDataModifier"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ </bean>
+
+ <bean name="WSEndpointAddressDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointAddressDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">EndpointAddress</property>
+ </bean>
+
+ <bean name="WSEndpointAPIDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointAPIDeploymentAspect">
+ <property name="provides">ContainerMetaData, RuntimeLoader, URLPattern, VFSRoot</property>
+ </bean>
+
+ <bean name="WSEndpointHandlerDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContainerEndpointHandler</property>
+ </bean>
+
+ <bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
+ <property name="requires">LAST_DEPLOYMENT_ASPECT</property>
+ </bean>
+
+ <bean name="WSEndpointMetricsDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
+ <property name="provides">EndpointMetrics</property>
+ </bean>
+
+ <bean name="WSEndpointNameDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">EndpointName</property>
+ </bean>
+
+ <bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
+ <property name="requires">EndpointName</property>
+ <property name="provides">RegisteredEndpoint</property>
+ </bean>
+
+ <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.deployment.tomcat.ModifyWebMetaDataDeploymentAspect">
+ <property name="requires">ContextProperties, StackDescriptor</property>
+ <property name="webMetaDataModifier"><inject bean="WSWebMetaDataModifier"/></property>
+ </bean>
+
+ <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">RuntimeLoader</property>
+ </bean>
+
+ <bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <property name="requires">ContextRoot, ContainerMetaData</property>
+ <property name="provides">URLPattern</property>
+ </bean>
+
+ <bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss50.transport.WebAppDeploymentAspect">
+ <property name="requires">WebMetaData, ContextProperties</property>
+ <property name="webMetaDataModifier"><inject bean="WSWebMetaDataModifier"/></property>
+ </bean>
+
+ <bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.container.jboss50.transport.WebAppGeneratorDeploymentAspect">
+ <property name="requires">VirtualHosts,URLPattern</property>
+ <property name="provides">WebMetaData</property>
+ <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
+ <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
+ </bean>
+
+ <!-- Deployment aspect helper beans -->
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandlerEJB3"/>
+ <bean name="WSWebMetaDataModifier" class="org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifierImpl"/>
+
+ <!-- Deployment aspect installers -->
+
+ <!-- Phase 1 -->
+ <bean name="WSDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSModifyWebMetaDataDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <!-- Phase 2 -->
+ <bean name="WSDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSRuntimeLoaderDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <bean name="WSDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSVirtualHostDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
+ <inject bean="WSRuntimeLoaderDeploymentAspect"/>
+ <inject bean="WSWebAppDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <bean name="WSDeploymentAspectInstallerEndpointAPI" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerEndpointAPI"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSDynamicEndpointDeploymentAspect"/>
+ <inject bean="WSEndpointAPIDeploymentAspect"/>
+ <inject bean="WSVirtualHostDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
</deployment>
Deleted: branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator
===================================================================
--- branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1 +0,0 @@
-org.jboss.wsf.framework.DefaultWSFRuntimeLocator
\ No newline at end of file
Deleted: branches/Branch_5_0/webservices/src/scripts/assembly-container.xml
===================================================================
--- branches/Branch_5_0/webservices/src/scripts/assembly-container.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/scripts/assembly-container.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,14 +0,0 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>container</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>src/resources/jbossws-jboss50-container.jar</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file
Deleted: branches/Branch_5_0/webservices/src/scripts/jbossws-deploy-macros.xml
===================================================================
--- branches/Branch_5_0/webservices/src/scripts/jbossws-deploy-macros.xml 2008-12-19 15:56:23 UTC (rev 82445)
+++ branches/Branch_5_0/webservices/src/scripts/jbossws-deploy-macros.xml 2008-12-19 16:00:48 UTC (rev 82446)
@@ -1,430 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
-<project>
-
- <!--
- These patterns should be common for all supported containers.
- All jars must also be declared in component-info.xml to ensure
- that the AS build uses the same version.
- -->
- <patternset id="jbossws.bin.patternset">
- <include name="**/wsconsume.bat"/>
- <include name="**/wsconsume.sh"/>
- <include name="**/wsprovide.bat"/>
- <include name="**/wsprovide.sh"/>
- <include name="**/wsrunclient.bat"/>
- <include name="**/wsrunclient.sh"/>
- <include name="**/wstools.bat"/>
- <include name="**/wstools.sh"/>
- </patternset>
-
- <patternset id="jbossws.client.patternset">
- <include name="**/sun-fi/lib/FastInfoset.jar"/>
- <include name="**/sun-jaxb/lib/jaxb-api.jar"/>
- <include name="**/jaxb-impl.jar"/>
- <include name="**/jaxb-xjc.jar"/>
- <include name="**/jaxws-tools.jar"/>
- <include name="**/jaxws-rt.jar"/>
- <include name="**/jbossws-common.jar"/>
- <include name="**/jbossws-framework.jar"/>
- <include name="**/jbossws-native-client.jar"/>
- <include name="**/jbossws-native-core.jar"/>
- <include name="**/jbossws-native-jaxrpc.jar"/>
- <include name="**/jbossws-native-jaxws.jar"/>
- <include name="**/jbossws-native-jaxws-ext.jar"/>
- <include name="**/jbossws-native-saaj.jar"/>
- <include name="**/jbossws-spi.jar"/>
- <include name="**/jettison.jar"/>
- <include name="**/policy.jar"/>
- <include name="**/stax-api/lib/stax-api.jar"/>
- <include name="**/stax-ex.jar"/>
- <include name="**/streambuffer.jar"/>
- <include name="**/wsdl4j.jar"/>
- <include name="**/wstx.jar"/>
- </patternset>
-
- <patternset id="jbossws.lib.patternset">
- <include name="**/nothing-to-deploy"/>
- </patternset>
-
- <patternset id="jbossws.lib.endorsed.patternset">
- <include name="**/jbossws-native-jaxrpc.jar"/>
- <include name="**/jbossws-native-jaxws.jar"/>
- <include name="**/jbossws-native-jaxws-ext.jar"/>
- <include name="**/jbossws-native-saaj.jar"/>
- <include name="**/jaxb-api.jar"/>
- </patternset>
-
- <patternset id="jbossws.server.lib.patternset">
- <include name="**/jbossws-common.jar"/>
- <include name="**/jbossws-framework.jar"/>
- <include name="**/jbossws-native-jaxrpc.jar"/>
- <include name="**/jbossws-native-jaxws.jar"/>
- <include name="**/jbossws-native-jaxws-ext.jar"/>
- <include name="**/jbossws-native-saaj.jar"/>
- <include name="**/jbossws-spi.jar"/>
- </patternset>
-
- <patternset id="jbossws.service.lib.patternset">
- <include name="**/sun-fi/lib/FastInfoset.jar"/>
- <include name="**/jboss-jaxb-intros.jar"/>
- <include name="**/jbossws-native-core.jar"/>
- <include name="**/jettison.jar"/>
- <include name="**/policy.jar"/>
- <include name="**/wsdl4j.jar"/>
- <include name="**/xmlsec.jar"/>
- </patternset>
-
- <!-- ================================================================== -->
- <!-- Deploy Bin -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-bin">
- <attribute name="artifactsdir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{artifactsdir}/bin">
- <patternset refid="jbossws.bin.patternset"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy Lib -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-lib42">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.lib.patternset"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <macrodef name="macro-deploy-jbossws-lib50">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.lib.patternset"/>
- <include name="**/jaxb-api.jar"/>
- <include name="**/jaxb-impl.jar"/>
- <include name="**/stax-api.jar"/>
- <include name="**/wstx.jar"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy Lib Endorsed -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-endorsed">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.lib.endorsed.patternset"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy Client -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-client42">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.client.patternset"/>
- <include name="**/jbossws-@{jbossid}.jar"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <macrodef name="macro-deploy-jbossws-client50">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.client.patternset"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy Server Lib -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-server-lib42">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.server.lib.patternset"/>
- <include name="**/jbossws-@{jbossid}.jar"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <macrodef name="macro-deploy-jbossws-server-lib50">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.server.lib.patternset"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy JUDDI Service -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-juddi-sar">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <unzip dest="@{targetdir}">
- <fileset dir="@{thirdpartydir}">
- <include name="**/juddi-service.sar"/>
- </fileset>
- </unzip>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy JBossWS Service -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-sar42">
- <attribute name="thirdpartydir"/>
- <attribute name="artifactsdir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.service.lib.patternset"/>
- <include name="**/jaxb-api.jar"/>
- <include name="**/jaxb-impl.jar"/>
- <include name="**/stax-api.jar"/>
- <include name="**/wstx.jar"/>
- </fileset>
- </copy>
- <unzip dest="@{targetdir}/jbossws-management.war">
- <fileset dir="@{thirdpartydir}">
- <include name="**/jbossws-native-management.war"/>
- </fileset>
- </unzip>
- <copy todir="@{targetdir}/jbossws.beans">
- <fileset dir="@{artifactsdir}/resources/jbossws-@{jbossid}/jbossws.beans">
- <include name="META-INF/**"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/META-INF">
- <fileset dir="@{artifactsdir}/resources/jbossws-@{jbossid}/jbossws-jboss42.sar/META-INF"/>
- <fileset dir="@{artifactsdir}/resources">
- <include name="standard-*-config.xml"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <macrodef name="macro-deploy-jbossws-sar50">
- <attribute name="thirdpartydir"/>
- <attribute name="artifactsdir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <unzip dest="@{targetdir}/jbossws-management.war">
- <fileset dir="@{thirdpartydir}">
- <include name="**/jbossws-native-management.war"/>
- </fileset>
- </unzip>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy Deployers -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-jbossws-deployers50">
- <attribute name="thirdpartydir"/>
- <attribute name="artifactsdir"/>
- <attribute name="targetdir"/>
- <attribute name="jbossid"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <patternset refid="jbossws.service.lib.patternset"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}">
- <fileset dir="@{artifactsdir}/resources/jbossws-@{jbossid}/jbossws.beans">
- <include name="META-INF/**"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}/META-INF">
- <fileset dir="@{artifactsdir}/resources">
- <include name="standard-*-config.xml"/>
- </fileset>
- </copy>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <include name="**/jbossws-common.jar"/>
- <include name="**/jbossws-framework.jar"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
- <!-- Deploy JBossWS -->
- <!-- ================================================================== -->
-
- <!-- JDK Detection -->
- <available classname="java.io.Console" property="HAVE_JDK_1.6"/>
-
- <target name="deploy-jbossws-native42" depends="check-parameters,deploy-jbossws-endorsed">
- <macro-deploy-jbossws-bin targetdir="${installserver}/../../bin" artifactsdir="${artifactsdir}"/>
- <macro-deploy-jbossws-client42 targetdir="${installserver}/../../client" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-jbossws-lib42 targetdir="${installserver}/../../lib" thirdpartydir="${thirdpartydir}"/>
- <macro-deploy-jbossws-server-lib42 targetdir="${installserver}/lib" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-jbossws-sar42 targetdir="${installserver}/deploy/jbossws.sar" artifactsdir="${artifactsdir}" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-juddi-sar targetdir="${installserver}/deploy/juddi-service.sar" thirdpartydir="${thirdpartydir}"/>
- </target>
-
- <target name="deploy-jbossws-native50" depends="check-parameters,deploy-jbossws-endorsed">
- <macro-deploy-jbossws-bin targetdir="${installserver}/../../bin" artifactsdir="${artifactsdir}"/>
- <macro-deploy-jbossws-client50 targetdir="${installserver}/../../client" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-jbossws-lib50 targetdir="${installserver}/../../lib" thirdpartydir="${thirdpartydir}"/>
- <macro-deploy-jbossws-server-lib50 targetdir="${installserver}/lib" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-jbossws-sar50 targetdir="${installserver}/deploy/jbossws.sar" artifactsdir="${artifactsdir}" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-jbossws-deployers50 targetdir="${installserver}/deployers/jbossws.deployer/" artifactsdir="${artifactsdir}" thirdpartydir="${thirdpartydir}" jbossid="${jbossid}"/>
- <macro-deploy-juddi-sar targetdir="${installserver}/deploy/juddi-service.sar" thirdpartydir="${thirdpartydir}"/>
- </target>
-
- <target name="deploy-jbossws-endorsed" if="HAVE_JDK_1.6">
- <macro-deploy-jbossws-endorsed targetdir="${installserver}/../../lib/endorsed" thirdpartydir="${thirdpartydir}"/>
- </target>
-
- <target name="check-parameters">
- <fail message="artifactsdir must be specified" unless="artifactsdir"/>
- <fail message="thirdpartydir must be specified" unless="thirdpartydir"/>
- <fail message="installserver must be specified" unless="installserver"/>
- </target>
-
- <!-- ================================================================== -->
- <!-- Undeploy JBossWS -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-undeploy-jbossws42">
- <attribute name="defaultconf"/>
- <attribute name="targetdir"/>
- <sequential>
- <loadfile property="jbossws.deploy.conf" srcfile="@{targetdir}/jbossws-deploy.conf" failonerror="false"/>
- <loadfile property="jbossws.deploy.conf" srcfile="@{defaultconf}" failonerror="false"/>
-
- <property name="jboss.server.home" value="@{targetdir}/../.."/>
- <property name="jboss.home" value="${jboss.server.home}/../.."/>
- <available property="jboss.undeploy.client" file="${jboss.home}/client"/>
- <fail message="Cannot find ${jboss.home}/client" unless="jboss.undeploy.client"/>
-
- <!-- delete stale container integration jars -->
- <delete>
- <fileset dir="${jboss.server.home}">
- <include name="**/jbossws-jboss*.jar"/>
- </fileset>
- <fileset dir="${jboss.home}/client">
- <include name="jbossws-jboss*.jar"/>
- </fileset>
- </delete>
-
- <!-- delete content of last deployment -->
- <delete>
- <fileset dir="${jboss.home}" includes="${jbossws.deploy.conf}"/>
- </delete>
-
- <!-- delete jbossws.sar -->
- <delete dir="@{targetdir}"/>
-
- <!-- delete juddi-service.sar -->
- <delete dir="@{targetdir}/../juddi-service.sar"/>
-
- </sequential>
- </macrodef>
-
- <macrodef name="macro-undeploy-jbossws50">
- <attribute name="defaultconf"/>
- <attribute name="targetdir"/>
- <sequential>
- <loadfile property="jbossws.deploy.conf" srcfile="@{targetdir}/jbossws-deploy.conf" failonerror="false"/>
- <loadfile property="jbossws.deploy.conf" srcfile="@{defaultconf}" failonerror="false"/>
-
- <property name="jboss.server.home" value="@{targetdir}/../.."/>
- <property name="jboss.home" value="${jboss.server.home}/../.."/>
- <available property="jboss.undeploy.client" file="${jboss.home}/client"/>
- <fail message="Cannot find ${jboss.home}/client" unless="jboss.undeploy.client"/>
-
- <!-- delete content of last deployment -->
- <delete>
- <fileset dir="${jboss.home}" includes="${jbossws.deploy.conf}"/>
- </delete>
-
- <!-- delete jbossws.sar -->
- <delete dir="@{targetdir}"/>
-
- <!-- delete juddi-service.sar -->
- <delete dir="@{targetdir}/../juddi-service.sar"/>
-
- </sequential>
- </macrodef>
-
-
-</project>
More information about the jboss-cvs-commits
mailing list