JBossWS SVN: r7061 - container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 08:15:50 -0400 (Fri, 16 May 2008)
New Revision: 7061
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Log:
fix formatting
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 12:03:46 UTC (rev 7060)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 12:15:50 UTC (rev 7061)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
+ xmlns="urn:jboss:bean-deployer:2.0">
<!--
*********************************************************************************************************************
@@ -26,9 +28,9 @@
Conceptually, each of these hooks implements the following pattern:
DeployerHook.deploy(unit)
- if(isWebServiceDeployment)
- Deployment dep = createDeployment(unit)
- DeploymentAspectManager.deploy(dep)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeploymentAspectManager.deploy(dep)
DeployerHook.undeploy(unit)
Deployment dep = getDeployment(unit)
16 years, 8 months
JBossWS SVN: r7060 - container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 08:03:46 -0400 (Fri, 16 May 2008)
New Revision: 7060
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Log:
refactoring - fix deployers config (WIP)
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 12:00:22 UTC (rev 7059)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 12:03:46 UTC (rev 7060)
@@ -46,7 +46,7 @@
<!--
A web service deployer that hooks in after the EJB deployers
-->
- <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
+ <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB">
<property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
<property name="relOrderEJB3"><inject bean="Ejb3Deployer" property="relativeOrder"/></property>
<depends>EJB2xDeployer</depends>
@@ -56,7 +56,7 @@
<!--
A web service deployer that hooks in before the WAR deployer
-->
- <bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPreJSE">
+ <bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE">
<property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
<depends>WebAppParsingDeployer</depends>
</bean>
@@ -65,7 +65,7 @@
A web service deployer that hooks in after the WAR deployer
This deployer depends on the RuntimeClassloader being available.
-->
- <bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPostJSE">
+ <bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE">
<property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
<depends>WebAppParsingDeployer</depends>
</bean>
@@ -75,7 +75,7 @@
-->
<!-- Phase 1 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookPreJSE">
+ <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>
@@ -90,7 +90,7 @@
<depends>WebServiceDeployerPreJSE</depends>
</bean>
<!-- Phase 2 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookPostJSE">
+ <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>
@@ -105,7 +105,7 @@
<depends>WebServiceDeployerPostJSE</depends>
</bean>
- <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookEJB21">
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookEJB21">
<property name="runtimeName">WebserviceEJBRuntime</property>
<install bean="WebServiceDeployerEJB" method="addDeployerHook">
<parameter>
@@ -121,7 +121,7 @@
</bean>
<!-- Phase 1 of JSE JAX-WS-->
- <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookPreJSE">
+ <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>
@@ -136,7 +136,7 @@
<depends>WebServiceDeployerPreJSE</depends>
</bean>
<!-- Phase 2 of JSE JAX-WS -->
- <bean name="WSDeployerHook_JAXWS_POST_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookPostJSE">
+ <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>
@@ -151,7 +151,7 @@
<depends>WebServiceDeployerPostJSE</depends>
</bean>
- <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookEJB3">
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3">
<property name="runtimeName">WebserviceEJBRuntime</property>
<install bean="WebServiceDeployerEJB" method="addDeployerHook">
<parameter>
16 years, 8 months
JBossWS SVN: r7059 - container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 08:00:22 -0400 (Fri, 16 May 2008)
New Revision: 7059
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
Log:
refactoring - no functional change (WIP)
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory 2008-05-16 11:57:45 UTC (rev 7058)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory 2008-05-16 12:00:22 UTC (rev 7059)
@@ -1 +1 @@
-org.jboss.wsf.container.jboss50.InvocationHandlerFactoryImpl
\ No newline at end of file
+org.jboss.wsf.container.jboss50.invocation.InvocationHandlerFactoryImpl
\ No newline at end of file
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory 2008-05-16 11:57:45 UTC (rev 7058)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory 2008-05-16 12:00:22 UTC (rev 7059)
@@ -1 +1 @@
-org.jboss.wsf.container.jboss50.SecurityAdapterFactoryImpl
\ No newline at end of file
+org.jboss.wsf.container.jboss50.invocation.SecurityAdapterFactoryImpl
\ No newline at end of file
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory 2008-05-16 11:57:45 UTC (rev 7058)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory 2008-05-16 12:00:22 UTC (rev 7059)
@@ -1 +1 @@
-org.jboss.wsf.container.jboss50.WebServiceContextFactoryImpl
\ No newline at end of file
+org.jboss.wsf.container.jboss50.invocation.WebServiceContextFactoryImpl
\ No newline at end of file
16 years, 8 months
JBossWS SVN: r7058 - in container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50: deployer and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 07:57:45 -0400 (Fri, 16 May 2008)
New Revision: 7058
Added:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/JSEArchiveMetaDataAdapter.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/RewriteResults.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/AbstractInvocationHandler.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerFactoryImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXRPC.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXWS.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdapterFactoryImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdaptorImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/ServiceEndpointInterceptor.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java
Removed:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookEJB.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractInvocationHandler.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractWebServiceDeployer.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHook.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXRPC.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXWS.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdaptorImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceMainDeployer.java
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java
Log:
refactoring - no functional change (WIP)
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-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.*;
-
-//$Id$
-
-
-/**
- * An abstract web service deployer.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 25-Apr-2007
- */
-public abstract class AbstractDeployerHook implements DeployerHook
-{
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
- protected String runtimeName;
- private WSFRuntime wsfRuntime;
-
- private DeploymentModelFactory deploymentModelFactory;
-
- public String getRuntimeName()
- {
- return runtimeName;
- }
-
- public void setRuntimeName(String runtimeName)
- {
- this.runtimeName = runtimeName;
- }
-
- public WSFRuntime getWsfRuntime()
- {
- if(null == wsfRuntime)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- wsfRuntime = spiProvider.getSPI(WSFRuntimeLocator.class).locateRuntime(runtimeName);
- }
-
- return wsfRuntime;
- }
-
- public void setWsfRuntime(WSFRuntime wsfRuntime)
- {
- this.wsfRuntime = wsfRuntime;
- }
-
- public DeploymentModelFactory getDeploymentModelFactory()
- {
- if(null == deploymentModelFactory)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
- }
-
- return deploymentModelFactory;
- }
-
- public ArchiveDeployment newDeployment(DeploymentUnit unit)
- {
- try
- {
- DeploymentModelFactory factory = getDeploymentModelFactory();
- ArchiveDeployment dep = (ArchiveDeployment)factory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
- if (unit.getParent() != null)
- {
- DeploymentUnit parentUnit = unit.getParent();
- ArchiveDeployment parentDep = (ArchiveDeployment)factory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
- dep.setParent(parentDep);
- }
- return dep;
- }
- catch (Exception ex)
- {
- throw new WSFDeploymentException("Cannot load spi.deployment.Deployment class", ex);
- }
- }
-
- public Endpoint newEndpoint(String targetBean)
- {
- try
- {
- return getDeploymentModelFactory().newEndpoint(targetBean);
- }
- catch (Exception ex)
- {
- throw new WSFDeploymentException("Cannot load spi.deployment.Endpoint class", ex);
- }
- }
-
- /** Return true if this deployment should be ignored
- */
- public boolean ignoreDeployment(DeploymentUnit unit)
- {
- String name = unit.getName();
- return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0);
- }
-
- /** Get the deployment type this deployer can handle
- */
- public abstract Deployment.DeploymentType getDeploymentType();
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookEJB.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookEJB.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-//$Id$
-
-/**
- * An abstract deployer for EJB Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-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);
- if(null==dep || Deployment.DeploymentState.CREATED != dep.getState())
- throw new DeploymentException("Create step failed");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
-
- }
-
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractDeployerHookJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,66 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import java.util.List;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * An abstract deployer for JSE Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractDeployerHookJSE extends ArchiveDeployerHook
-{
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- boolean isGenerated = Boolean.TRUE.equals(unit.getAttachment(WebAppDesciptorModifier.PROPERTY_GENERATED_WEBAPP));
- return webMetaData != null && isGenerated == false;
- }
-
- protected String getTargetBean(ServletMetaData servlet)
- {
- String endpointClass = servlet.getServletClass();
- List<ParamValueMetaData> initParams = servlet.getInitParam();
- if (initParams != null)
- {
- for (ParamValueMetaData param : initParams)
- {
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(param.getParamName()))
- {
- endpointClass = param.getParamValue();
- break;
- }
- }
- }
- return endpointClass;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractInvocationHandler.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractInvocationHandler.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractInvocationHandler.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import org.jboss.wsf.common.JavaUtils;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public abstract class AbstractInvocationHandler extends InvocationHandler
-{
- protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
- {
- String methodName = seiMethod.getName();
- Class[] paramTypes = seiMethod.getParameterTypes();
- for (int i = 0; i < paramTypes.length; i++)
- {
- Class paramType = paramTypes[i];
- if (JavaUtils.isPrimitive(paramType) == false)
- {
- String paramTypeName = paramType.getName();
- paramType = JavaUtils.loadJavaType(paramTypeName);
- paramTypes[i] = paramType;
- }
- }
-
- Method implMethod = implClass.getMethod(methodName, paramTypes);
- return implMethod;
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractWebServiceDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractWebServiceDeployer.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/AbstractWebServiceDeployer.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-
-/**
- * This deployer that calls the registered DeployerHooks
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public abstract class AbstractWebServiceDeployer<T> extends AbstractComponentDeployer
-{
- // provide logging
- private static final Logger log = Logger.getLogger(AbstractWebServiceDeployer.class);
-
- private List<DeployerHook> deployerHooks = new LinkedList<DeployerHook>();
-
- public void addDeployerHook(DeployerHook deployer)
- {
- log.debug("Add deployer hook: " + deployer);
- deployerHooks.add(deployer);
- }
-
- public void removeDeployerHook(DeployerHook deployer)
- {
- log.debug("Remove deployer hook: " + deployer);
- deployerHooks.remove(deployer);
- }
-
- @Override
- public void internalDeploy(DeploymentUnit unit) throws DeploymentException
- {
- for (DeployerHook deployer : deployerHooks)
- deployer.deploy(unit);
- }
-
- @Override
- public void internalUndeploy(DeploymentUnit unit)
- {
- for (DeployerHook deployer : deployerHooks)
- deployer.undeploy(unit);
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ArchiveDeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,147 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.w3c.dom.Element;
-
-import java.net.URL;
-
-/**
- * An abstract web service deployer.
- *
- * deploy(unit)
- * if(isWebServiceDeployment)
- * dep = createDeployment(unit)
- * deploy(dep)
- *
- * undeploy(unit)
- * dep = getDeployment(unit)
- * undeploy(dep)
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public abstract class ArchiveDeployerHook extends AbstractDeployerHook
-{
-
- /** Depending on the type of deployment, this method should return true
- * if the deployment contains web service endpoints.
- */
- public abstract boolean isWebServiceDeployment(DeploymentUnit unit);
-
- /** Create the Deployment for a given DeploymentUnit
- */
- public abstract Deployment createDeployment(DeploymentUnit unit);
-
- /** Get the Deployment for a given DeploymentUnit
- */
- public Deployment getDeployment(DeploymentUnit unit)
- {
- Deployment dep = unit.getAttachment(Deployment.class);
- return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
- }
-
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (ignoreDeployment(unit))
- return;
-
- if (isWebServiceDeployment(unit))
- {
- log.debug("deploy: " + unit.getName());
- Deployment dep = getDeployment(unit);
- if (dep == null)
- {
- dep = createDeployment(unit);
- dep.addAttachment(DeploymentUnit.class, unit);
- }
-
- getWsfRuntime().create(dep);
- unit.addAttachment(Deployment.class, dep);
- }
- }
-
- public void undeploy(DeploymentUnit unit)
- {
- if (ignoreDeployment(unit))
- return;
-
- Deployment dep = getDeployment(unit);
- if (dep != null)
- {
- log.debug("undeploy: " + unit.getName());
- getWsfRuntime().stop(dep);
- getWsfRuntime().destroy(dep);
- }
- }
-
- /** Unmrashall the webservices.xml if there is one
- */
- protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
- {
- WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
- UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
- if (wsMetaData == null && vfWebservices != null)
- {
- try
- {
- URL wsURL = vfWebservices.toURL();
- Element root = DOMUtils.parse(wsURL.openStream());
- String namespaceURI = root.getNamespaceURI();
- if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
- {
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new WebservicesFactory(wsURL);
- wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
- unit.addAttachment(WebservicesMetaData.class, wsMetaData);
- }
- }
- catch (Exception ex)
- {
- throw new WSFDeploymentException(ex);
- }
- }
- return wsMetaData;
- }
-
- private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit)
- {
- VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml");
- return (vf != null ? new VirtualFileAdaptor(vf) : null);
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-
-/**
- * Build container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ContainerMetaDataAdapter
-{
- // logging support
- private static Logger log = Logger.getLogger(ContainerMetaDataAdapter.class);
-
- private EJBArchiveMetaDataAdapterEJB3 ejbMetaDataAdapterEJB3 = new EJBArchiveMetaDataAdapterEJB3();
- private EJBArchiveMetaDataAdapterEJB21 ejbMetaDataAdapterEJB21 = new EJBArchiveMetaDataAdapterEJB21();
- private JSEArchiveMetaDataAdapter webMetaDataAdapter = new JSEArchiveMetaDataAdapter();
-
- public void setEjbMetaDataAdapterEJB21(EJBArchiveMetaDataAdapterEJB21 adapter)
- {
- this.ejbMetaDataAdapterEJB21 = adapter;
- }
-
- public void setEjbMetaDataAdapterEJB3(EJBArchiveMetaDataAdapterEJB3 adapter)
- {
- this.ejbMetaDataAdapterEJB3 = adapter;
- }
-
- public void setWebMetaDataAdapter(JSEArchiveMetaDataAdapter adapter)
- {
- this.webMetaDataAdapter = adapter;
- }
-
- public void buildContainerMetaData(Deployment dep, DeploymentUnit unit)
- {
- dep.addAttachment(DeploymentUnit.class, unit);
-
- try
- {
- // JSE endpoints
- if (unit.getAttachment(JBossWebMetaData.class) != null)
- {
- JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildMetaData(dep, unit);
- if (webMetaData != null)
- dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
-
- if (dep instanceof ArchiveDeployment)
- {
- URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
- dep.setProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_URL, webURL);
- }
- }
-
- // EJB3 endpoints
- else if (unit.getAttachment(Ejb3Deployment.class) != null)
- {
- EJBArchiveMetaData ejbMetaData = ejbMetaDataAdapterEJB3.buildMetaData(dep, unit);
- if (ejbMetaData != null)
- dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
- }
-
- // EJB21 endpoints
- else if (unit.getAttachment(JBossMetaData.class) != null)
- {
- EJBArchiveMetaData ejbMetaData = ejbMetaDataAdapterEJB21.buildMetaData(dep, unit);
- if (ejbMetaData != null)
- dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(ex);
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-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
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ContainerMetaDataDeploymentAspect extends DeploymentAspect
-{
- private ContainerMetaDataAdapter metaDataAdapter = new ContainerMetaDataAdapter();
-
- public void setMetaDataAdapter(ContainerMetaDataAdapter adapter)
- {
- this.metaDataAdapter = adapter;
- }
-
- @Override
- public void create(Deployment dep, WSFRuntime runtime)
- {
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit == null)
- throw new IllegalStateException("Cannot obtain deployment unit");
-
- metaDataAdapter.buildContainerMetaData(dep, unit);
- }
-}
\ No newline at end of file
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DefaultWebAppDesciptorModifierImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -27,6 +27,7 @@
import org.dom4j.Document;
import org.dom4j.Element;
import org.jboss.logging.Logger;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.RewriteResults;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHook.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-
-/**
- * An interface for all web service deployer hooks
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public interface DeployerHook
-{
- void deploy(DeploymentUnit unit) throws DeploymentException;
-
- void undeploy(DeploymentUnit unit);
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * @author Thomas.Diesler(a)jboss.com
- */
-public abstract class DeployerHookPostJSE extends AbstractDeployerHookJSE
-{
- /**
- * The deployment should be created in phase 1.
- */
- public Deployment createDeployment(DeploymentUnit unit)
- {
- Deployment dep = unit.getAttachment(Deployment.class);
- if (null == dep)
- throw new IllegalStateException("spi.Deployment missing. It should be created in Phase 1");
-
- return dep;
- }
-
- /**
- * A phase 2 deployer hook needs to reject first-place
- * JSE deployments and wait for those that are re-written.
- * We rely on the fact that spi.Deployment is created in phase 1.
- */
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- if (super.isWebServiceDeployment(unit) == false)
- return false;
-
- Deployment deployment = unit.getAttachment(Deployment.class);
- return deployment != null;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,176 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
-import org.jboss.metadata.javaee.spec.PortComponent;
-import org.jboss.wsf.spi.deployment.Deployment;
-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.spi.metadata.j2ee.MDBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class EJBArchiveMetaDataAdapterEJB21
-{
- // logging support
- private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB21.class);
-
- public EJBArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
- {
- JBossMetaData jbossMetaData = unit.getAttachment(JBossMetaData.class);
- dep.addAttachment(JBossMetaData.class, jbossMetaData);
-
- EJBArchiveMetaData ejbMetaData = new EJBArchiveMetaData();
- buildEnterpriseBeansMetaData(ejbMetaData, jbossMetaData);
- buildWebservicesMetaData(ejbMetaData, jbossMetaData);
- ejbMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
-
- return ejbMetaData;
- }
-
- private void buildEnterpriseBeansMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
- {
- List<EJBMetaData> targetBeans = new ArrayList<EJBMetaData>();
- JBossEnterpriseBeansMetaData sourceBeans = jbossMetaData.getEnterpriseBeans();
- Iterator<JBossEnterpriseBeanMetaData> it = sourceBeans.iterator();
- while (it.hasNext())
- {
- JBossEnterpriseBeanMetaData bmd = it.next();
- buildBeanMetaData(targetBeans, bmd);
- }
- ejbMetaData.setEnterpriseBeans(targetBeans);
- }
-
- private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
- {
- WebservicesMetaData webservices = jbossMetaData.getWebservices();
- if (webservices != null)
- {
- String contextRoot = webservices.getContextRoot();
- ejbMetaData.setWebServiceContextRoot(contextRoot);
-
- ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
-
- WebserviceDescriptionsMetaData wsDescriptions = webservices.getWebserviceDescriptions();
- if (wsDescriptions != null)
- {
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- ejbMetaData.setConfigName(wsd.getConfigName());
- ejbMetaData.setConfigFile(wsd.getConfigFile());
- }
- }
- }
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.get(name) != null)
- {
- WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
- wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
- }
- return wsdlPublishLocation;
- }
- };
- }
-
- private EJBMetaData buildBeanMetaData(List<EJBMetaData> ejbBeans, JBossEnterpriseBeanMetaData jbossBeansMetaData)
- {
- EJBMetaData targetBean = null;
- if (jbossBeansMetaData.isSession())
- {
- targetBean = new SLSBMetaData();
- JBossSessionBeanMetaData jbossSessionBean = (JBossSessionBeanMetaData)jbossBeansMetaData;
-
- targetBean.setEjbName(jbossSessionBean.getEjbName());
- targetBean.setEjbClass(jbossSessionBean.getEjbClass());
- targetBean.setServiceEndpointInterface(jbossSessionBean.getServiceEndpoint());
- targetBean.setHome(jbossSessionBean.getHome());
- targetBean.setLocalHome(jbossSessionBean.getLocalHome());
- targetBean.setJndiName(jbossSessionBean.determineJndiName());
- targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
-
- PortComponent pcmd = jbossSessionBean.getPortComponent();
- if (pcmd != null)
- {
- targetBean.setPortComponentName(pcmd.getPortComponentName());
- targetBean.setPortComponentURI(pcmd.getPortComponentURI());
- EJBSecurityMetaData smd = new EJBSecurityMetaData();
- smd.setAuthMethod(pcmd.getAuthMethod());
- smd.setTransportGuarantee(pcmd.getTransportGuarantee());
- smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
- targetBean.setSecurityMetaData(smd);
- }
- }
- else if (jbossBeansMetaData.isMessageDriven())
- {
- targetBean = new MDBMetaData();
- JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossBeansMetaData;
-
- targetBean.setEjbName(jbossMessageBean.getEjbName());
- targetBean.setEjbClass(jbossMessageBean.getEjbClass());
- //targetBean.setServiceEndpointInterface(???);
- //targetBean.setJndiName(???);
- targetBean.setLocalJndiName(jbossBeansMetaData.getLocalJndiName());
- ((MDBMetaData)targetBean).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
- }
-
- if (targetBean != null)
- ejbBeans.add(targetBean);
-
- return targetBean;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,185 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.mdb.MessagingContainer;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossGenericBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
-import org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData;
-import org.jboss.metadata.javaee.spec.PortComponent;
-import org.jboss.wsf.spi.deployment.Deployment;
-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.spi.metadata.j2ee.MDBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Apr-2007
- */
-public class EJBArchiveMetaDataAdapterEJB3
-{
- // logging support
- private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB3.class);
-
- public EJBArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
- {
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
-
- EJBArchiveMetaData umd = new EJBArchiveMetaData();
- buildEnterpriseBeansMetaData(umd, ejb3Deployment);
-
- JBossMetaData jbMetaData = unit.getAttachment(JBossMetaData.class);
- if (jbMetaData != null)
- buildWebservicesMetaData(umd, jbMetaData);
-
- return umd;
- }
-
- private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbMetaData)
- {
- WebservicesMetaData wsMetaData = jbMetaData.getWebservices();
- if (wsMetaData != null)
- {
- String contextRoot = wsMetaData.getContextRoot();
- ejbMetaData.setWebServiceContextRoot(contextRoot);
-
- ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wsMetaData));
-
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null)
- {
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- ejbMetaData.setConfigName(wsd.getConfigName());
- ejbMetaData.setConfigFile(wsd.getConfigFile());
- }
- }
- }
- }
-
- private void buildEnterpriseBeansMetaData(EJBArchiveMetaData jarMetaData, Ejb3Deployment ejb3Deployment)
- {
- List<EJBMetaData> ejbMetaDataList = new ArrayList<EJBMetaData>();
- Iterator<Container> it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
-
- EJBMetaData ejbMetaData = null;
- PortComponent pcMetaData = null;
- if (container instanceof StatelessContainer)
- {
- ejbMetaData = new SLSBMetaData();
- JBossEnterpriseBeanMetaData beanMetaData = container.getXml();
- if (beanMetaData instanceof JBossGenericBeanMetaData)
- {
- pcMetaData = ((JBossGenericBeanMetaData)beanMetaData).getPortComponent();
- }
- else if (beanMetaData instanceof JBossSessionBeanMetaData)
- {
- pcMetaData = ((JBossSessionBeanMetaData)beanMetaData).getPortComponent();
- }
- }
- else if (container instanceof MessagingContainer)
- {
- ejbMetaData = new MDBMetaData();
- MessagingContainer mdb = (MessagingContainer)container;
- Map props = mdb.getActivationConfigProperties();
- if (props != null)
- {
- ActivationConfigPropertyMetaData destProp = (ActivationConfigPropertyMetaData)props.get("destination");
- if (destProp != null)
- {
- String destination = destProp.getValue();
- ((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
- }
- }
- }
-
- if (ejbMetaData != null)
- {
- ejbMetaData.setEjbName(container.getEjbName());
- ejbMetaData.setEjbClass(container.getBeanClassName());
-
- if (pcMetaData != null)
- {
- ejbMetaData.setPortComponentName(pcMetaData.getPortComponentName());
- ejbMetaData.setPortComponentURI(pcMetaData.getPortComponentURI());
- EJBSecurityMetaData smd = new EJBSecurityMetaData();
- smd.setAuthMethod(pcMetaData.getAuthMethod());
- smd.setTransportGuarantee(pcMetaData.getTransportGuarantee());
- smd.setSecureWSDLAccess(pcMetaData.getSecureWSDLAccess());
- ejbMetaData.setSecurityMetaData(smd);
- }
-
- ejbMetaDataList.add(ejbMetaData);
- }
- }
-
- jarMetaData.setEnterpriseBeans(ejbMetaDataList);
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
- {
- return new PublishLocationAdapter() {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.get(name) != null)
- {
- WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
- wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
- }
- return wsdlPublishLocation;
- }
- };
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,188 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-import java.security.Principal;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.ejb.EjbModule;
-import org.jboss.ejb.Interceptor;
-import org.jboss.ejb.StatelessSessionContainer;
-import org.jboss.invocation.InvocationKey;
-import org.jboss.invocation.InvocationType;
-import org.jboss.invocation.PayloadKey;
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.security.SecurityContext;
-import org.jboss.security.plugins.SecurityContextAssociation;
-import org.jboss.wsf.common.ObjectNameFactory;
-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.invocation.HandlerCallback;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.SecurityAdaptor;
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
-
-/**
- * Handles invocations on EJB21 endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerEJB21 extends InvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
-
- private String jndiName;
- private MBeanServer server;
- private ObjectName objectName;
-
- InvocationHandlerEJB21()
- {
- }
-
- public Invocation createInvocation()
- {
- return new Invocation();
- }
-
- public void init(Endpoint ep)
- {
- String ejbName = ep.getShortName();
- Deployment dep = ep.getService().getDeployment();
- EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
- if (beanMetaData == null)
- throw new WebServiceException("Cannot obtain ejb meta data for: " + ejbName);
-
- // get the bean's JNDI name
- jndiName = beanMetaData.getContainerObjectNameJndiName();
- if (jndiName == null)
- throw new WebServiceException("Cannot obtain JNDI name for: " + ejbName);
-
- server = MBeanServerLocator.locateJBoss();
- objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
- if (server.isRegistered(objectName) == false)
- throw new WebServiceException("Cannot find service endpoint target: " + objectName);
-
- // Dynamically add the service endpoint interceptor
- // http://jira.jboss.org/jira/browse/JBWS-758
- try
- {
- EjbModule ejbModule = (EjbModule)server.getAttribute(objectName, "EjbModule");
- StatelessSessionContainer container = (StatelessSessionContainer)ejbModule.getContainer(ejbName);
-
- boolean injectionPointFound = false;
- Interceptor prev = container.getInterceptor();
- while (prev != null && prev.getNext() != null)
- {
- Interceptor next = prev.getNext();
- if (next.getNext() == null)
- {
- log.debug("Inject service endpoint interceptor after: " + prev.getClass().getName());
- ServiceEndpointInterceptor sepInterceptor = new ServiceEndpointInterceptor();
- prev.setNext(sepInterceptor);
- sepInterceptor.setNext(next);
- injectionPointFound = true;
- }
- prev = next;
- }
- if (injectionPointFound == false)
- log.warn("Cannot service endpoint interceptor injection point");
- }
- catch (Exception ex)
- {
- log.warn("Cannot add service endpoint interceptor", ex);
- }
-
- }
-
- public void invoke(Endpoint ep, Invocation inv) throws Exception
- {
- log.debug("Invoke: " + inv.getJavaMethod().getName());
-
- // invoke on the container
- try
- {
- // setup the invocation
- org.jboss.invocation.Invocation jbInv = getMBeanInvocation(inv);
-
- String[] sig = { org.jboss.invocation.Invocation.class.getName() };
- Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
- inv.setReturnValue(retObj);
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-
- private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
- {
- // EJB2.1 endpoints will only get an JAXRPC context
- MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
- if (msgContext == null)
- throw new IllegalStateException("Cannot obtain MessageContext");
-
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
- SecurityContext sc = SecurityContextAssociation.getSecurityContext();
- Principal principal = securityAdaptor.getPrincipal();
- Object credential = securityAdaptor.getCredential();
-
- if (principal == null && sc != null)
- principal = sc.getUtil().getUserPrincipal();
-
- if (credential == null && sc != null)
- credential = sc.getUtil().getCredential();
-
- Method method = inv.getJavaMethod();
- Object[] args = inv.getArgs();
- org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
-
- HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
- if (callback == null)
- throw new IllegalStateException("Cannot obtain HandlerCallback");
-
- jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
- jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
- jbInv.setType(InvocationType.SERVICE_ENDPOINT);
- jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
- jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
-
- return jbInv;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,151 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import javax.ejb.EJBContext;
-import javax.management.ObjectName;
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.aop.Dispatcher;
-import org.jboss.aop.MethodInfo;
-import org.jboss.ejb3.BeanContext;
-import org.jboss.ejb3.BeanContextLifecycleCallback;
-import org.jboss.ejb3.EJBContainerInvocation;
-import org.jboss.ejb3.stateless.StatelessBeanContext;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.injection.lang.reflect.BeanProperty;
-import org.jboss.wsf.common.ObjectNameFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.InvocationType;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-
-/**
- * Handles invocations on EJB3 endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerEJB3 extends AbstractInvocationHandler
-{
- private ObjectName objectName;
-
- InvocationHandlerEJB3()
- {
- }
-
- public Invocation createInvocation()
- {
- return new Invocation();
- }
-
- public void init(Endpoint ep)
- {
- String ejbName = ep.getShortName();
- ArchiveDeployment dep = (ArchiveDeployment)ep.getService().getDeployment();
- String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + dep.getSimpleName();
- if (dep.getParent() != null)
- {
- nameStr += ",ear=" + dep.getParent().getSimpleName();
- }
-
- objectName = ObjectNameFactory.create(nameStr.toString());
-
- Dispatcher dispatcher = Dispatcher.singleton;
- if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
- throw new WebServiceException("Cannot find service endpoint target: " + objectName);
- }
-
- public void invoke(Endpoint ep, Invocation wsInv) throws Exception
- {
- try
- {
- Dispatcher dispatcher = Dispatcher.singleton;
- StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
- Class beanClass = container.getBeanClass();
-
- Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
- Object[] args = wsInv.getArgs();
-
- MethodInfo info = container.getMethodInfo(method);
- EJBContainerInvocation<StatelessContainer, StatelessBeanContext> jbInv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
- jbInv.setAdvisor(container);
- jbInv.setArguments(args);
- jbInv.setContextCallback(new CallbackImpl(wsInv));
-
- Object retObj = jbInv.invokeNext();
-
- wsInv.setReturnValue(retObj);
- }
- catch (Throwable th)
- {
- handleInvocationException(th);
- }
- }
-
- static class CallbackImpl implements BeanContextLifecycleCallback
- {
- private javax.xml.ws.handler.MessageContext jaxwsMessageContext;
- private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
-
- public CallbackImpl(Invocation epInv)
- {
- jaxrpcMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
- jaxwsMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.ws.handler.MessageContext.class);
- }
-
- public void attached(BeanContext beanCtx)
- {
- StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
- sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
-
- BeanProperty beanProp = sbc.getWebServiceContextProperty();
- if (beanProp != null)
- {
- EJBContext ejbCtx = beanCtx.getEJBContext();
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ExtensibleWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).newWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
- wsContext.addAttachment(EJBContext.class, ejbCtx);
- beanProp.set(beanCtx.getInstance(), wsContext);
- }
- }
-
- public void released(BeanContext beanCtx)
- {
- StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
- sbc.setMessageContextJAXRPC(null);
-
- BeanProperty beanProp = sbc.getWebServiceContextProperty();
- if (beanProp != null)
- beanProp.set(beanCtx.getInstance(), null);
- }
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.wsf.spi.invocation.*;
-
-/**
- * The default invocation model factory fro AS 5.0.
- *
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
-{
- public InvocationHandler newInvocationHandler(InvocationType type)
- {
- InvocationHandler handler = null;
-
- switch(type)
- {
- case JAXRPC_JSE:
- handler = new InvocationHandlerJAXRPC();
- break;
- case JAXRPC_EJB21:
- handler = new InvocationHandlerEJB21();
- break;
- case JAXRPC_MDB21:
- handler = new InvocationHandlerMDB21();
- break;
- case JAXWS_JSE:
- handler = new InvocationHandlerJAXWS();
- break;
- case JAXWS_EJB3:
- handler = new InvocationHandlerEJB3();
- break;
- case JAXWS_MDB3:
- handler = new InvocationHandlerMDB3();
- break;
- }
-
- if(null == handler)
- throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " +type);
-
- return handler;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXRPC.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXRPC.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXRPC.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import javax.xml.rpc.server.ServiceLifecycle;
-import javax.xml.rpc.server.ServletEndpointContext;
-
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJAXRPC extends InvocationHandlerJSE
-{
- public void invoke(Endpoint ep, Invocation epInv) throws Exception
- {
- try
- {
- Object targetBean = getTargetBean(ep, epInv);
-
- InvocationContext invContext = epInv.getInvocationContext();
- if (targetBean instanceof ServiceLifecycle)
- {
- ServletEndpointContext sepContext = invContext.getAttachment(ServletEndpointContext.class);
- if (sepContext != null)
- ((ServiceLifecycle)targetBean).init(sepContext);
- }
-
- try
- {
- super.invoke(ep, epInv);
- }
- finally
- {
- if (targetBean instanceof ServiceLifecycle)
- {
- ((ServiceLifecycle)targetBean).destroy();
- }
- }
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXWS.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXWS.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJAXWS.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJAXWS extends InvocationHandlerJSE
-{
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.wsf.common.JavaUtils;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-import org.jboss.wsf.spi.invocation.InvocationHandler;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-
-/**
- * Handles invocations on JSE endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerJSE extends InvocationHandler
-{
- private SPIProvider spiProvider;
- private ResourceInjectorFactory resourceInjectorFactory;
-
- public InvocationHandlerJSE()
- {
- spiProvider = SPIProviderResolver.getInstance().getProvider();
- resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
- }
-
- public Invocation createInvocation()
- {
- return new Invocation();
- }
-
- public void init(Endpoint ep)
- {
- }
-
- protected Object getTargetBean(Endpoint ep, Invocation epInv)
- {
- InvocationContext invCtx = epInv.getInvocationContext();
- Object targetBean = invCtx.getTargetBean();
- if (targetBean == null)
- {
- try
- {
- Class epImpl = ep.getTargetBeanClass();
- targetBean = epImpl.newInstance();
- invCtx.setTargetBean(targetBean);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Cannot get target bean instance", ex);
- }
- }
- return targetBean;
- }
-
- public void invoke(Endpoint ep, Invocation epInv) throws Exception
- {
- try
- {
- Object targetBean = getTargetBean(ep, epInv);
-
- InvocationContext invContext = epInv.getInvocationContext();
- WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
- if (wsContext != null)
- {
- ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
- injector.inject(targetBean, wsContext);
- }
-
- Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
- Object retObj = method.invoke(targetBean, epInv.getArgs());
- epInv.setReturnValue(retObj);
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-
- protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
- {
- String methodName = seiMethod.getName();
- Class[] paramTypes = seiMethod.getParameterTypes();
- for (int i = 0; i < paramTypes.length; i++)
- {
- Class paramType = paramTypes[i];
- if (JavaUtils.isPrimitive(paramType) == false)
- {
- String paramTypeName = paramType.getName();
- paramType = JavaUtils.loadJavaType(paramTypeName);
- paramTypes[i] = paramType;
- }
- }
-
- Method implMethod = implClass.getMethod(methodName, paramTypes);
- return implMethod;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-
-/**
- * Handles invocations on MDB EJB21 endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerMDB21 extends AbstractInvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(InvocationHandlerMDB21.class);
-
- public Invocation createInvocation()
- {
- return new Invocation();
- }
-
- public void init(Endpoint ep)
- {
-
- }
-
- public void invoke(Endpoint ep, Invocation epInv) throws Exception
- {
- log.debug("Invoke: " + epInv.getJavaMethod().getName());
-
- try
- {
- InvocationContext invCtx = epInv.getInvocationContext();
- Object targetBean = invCtx.getTargetBean();
- if (targetBean == null)
- {
- try
- {
- Class epImpl = ep.getTargetBeanClass();
- targetBean = epImpl.newInstance();
- invCtx.setTargetBean(targetBean);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Canot get target bean instance", ex);
- }
- }
- Class implClass = targetBean.getClass();
- Method seiMethod = epInv.getJavaMethod();
- Method implMethod = getImplMethod(implClass, seiMethod);
-
- Object[] args = epInv.getArgs();
- Object retObj = implMethod.invoke(targetBean, args);
- epInv.setReturnValue(retObj);
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.lang.reflect.Method;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-
-/**
- * Handles invocations on MDB EJB3 endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class InvocationHandlerMDB3 extends AbstractInvocationHandler
-{
- // provide logging
- private static final Logger log = Logger.getLogger(InvocationHandlerMDB3.class);
-
- public Invocation createInvocation()
- {
- return new Invocation();
- }
-
- public void init(Endpoint ep)
- {
-
- }
-
- public void invoke(Endpoint ep, Invocation epInv) throws Exception
- {
- log.debug("Invoke: " + epInv.getJavaMethod().getName());
-
- try
- {
- InvocationContext invCtx = epInv.getInvocationContext();
- Object targetBean = invCtx.getTargetBean();
- if (targetBean == null)
- {
- try
- {
- Class epImpl = ep.getTargetBeanClass();
- targetBean = epImpl.newInstance();
- invCtx.setTargetBean(targetBean);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Canot get target bean instance", ex);
- }
- }
- Class implClass = targetBean.getClass();
- Method seiMethod = epInv.getJavaMethod();
- Method implMethod = getImplMethod(implClass, seiMethod);
-
- Object[] args = epInv.getArgs();
- Object retObj = implMethod.invoke(targetBean, args);
- epInv.setReturnValue(retObj);
- }
- catch (Exception e)
- {
- handleInvocationException(e);
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-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.Service;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * A deployer JAXRPC EJB21 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookEJB21 extends AbstractDeployerHookEJB
-{
- /** Get the deployemnt type this deployer can handle
- */
- public DeploymentType getDeploymentType()
- {
- return DeploymentType.JAXRPC_EJB21;
- }
-
- @Override
- public Deployment createDeployment(DeploymentUnit unit)
- {
- ArchiveDeployment dep = newDeployment(unit);
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setRuntimeClassLoader(unit.getClassLoader());
- dep.setType(getDeploymentType());
-
- Service service = dep.getService();
-
- JBossMetaData jbmd = unit.getAttachment(JBossMetaData.class);
- if (jbmd == null)
- throw new IllegalStateException("Deployment unit does not contain application meta data");
-
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
- if (wsMetaData == null)
- throw new IllegalStateException("Deployment unit does not contain webservices meta data");
-
- // Copy the attachments
- dep.addAttachment(WebservicesMetaData.class, wsMetaData);
- dep.addAttachment(JBossMetaData.class, jbmd);
-
- for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
- {
- for (PortComponentMetaData pcmd : wsd.getPortComponents())
- {
- String ejbLink = pcmd.getEjbLink();
- if (ejbLink == null)
- throw new IllegalStateException("ejb-link cannot be null");
-
- JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbLink);
- if (beanMetaData == null)
- throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);
-
- String ejbClass = beanMetaData.getEjbClass();
-
- // Create the endpoint
- Endpoint ep = newEndpoint(ejbClass);
- ep.setShortName(ejbLink);
- service.addEndpoint(ep);
- }
- }
- return dep;
- }
-
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
- return wsMetaData != null && unit.getAllMetaData(JBossMetaData.class).size() > 0;
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * A deployer JAXRPC JSE Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookPostJSE extends DeployerHookPostJSE
-{
- /** Get the deployment type this deployer can handle
- */
- public Deployment.DeploymentType getDeploymentType()
- {
- return Deployment.DeploymentType.JAXRPC_JSE;
- }
-
-
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
- return (wsMetaData!=null && super.isWebServiceDeployment(unit));
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-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.Service;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * A deployer JAXRPC JSE Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-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()
- {
- return DeploymentType.JAXRPC_JSE;
- }
-
- /**
- * Create an endpoint for every servlet-link in webservices.xml
- */
- @Override
- public Deployment createDeployment(DeploymentUnit unit)
- {
- ArchiveDeployment dep = newDeployment(unit);
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setRuntimeClassLoader(null);
- dep.setType(getDeploymentType());
-
- Service service = dep.getService();
-
- JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- if (webMetaData == null)
- throw new IllegalStateException("Deployment unit does not contain web meta data");
-
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
- if (wsMetaData == null)
- throw new IllegalStateException("Deployment unit does not contain webservices meta data");
-
- // Copy the attachments
- dep.addAttachment(WebservicesMetaData.class, wsMetaData);
- dep.addAttachment(JBossWebMetaData.class, webMetaData);
-
- for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
- {
- for (PortComponentMetaData pcmd : wsd.getPortComponents())
- {
- String servletLink = pcmd.getServletLink();
- if (servletLink == null)
- throw new IllegalStateException("servlet-link cannot be null");
-
- ServletMetaData servlet = getServletForName(webMetaData, servletLink);
- String targetBean = getTargetBean(servlet);
-
- // Create the endpoint
- Endpoint ep = newEndpoint(targetBean);
- ep.setShortName(servletLink);
- service.addEndpoint(ep);
- }
- }
-
- return dep;
- }
-
- private ServletMetaData getServletForName(JBossWebMetaData wmd, String servletLink)
- {
- for (JBossServletMetaData servlet : wmd.getServlets())
- {
- if (servletLink.equals(servlet.getName()))
- {
- return servlet;
- }
- }
- throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
- }
-
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- if (super.isWebServiceDeployment(unit) == false)
- return false;
-
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
- return wsMetaData != null;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.mdb.MessagingContainer;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Service;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-import java.util.Iterator;
-
-/**
- * A deployer JAXWS EJB3 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class JAXWSDeployerHookEJB3 extends AbstractDeployerHookEJB
-{
- /** Get the deployemnt type this deployer can handle
- */
- public DeploymentType getDeploymentType()
- {
- return DeploymentType.JAXWS_EJB3;
- }
-
- @Override
- public Deployment createDeployment(DeploymentUnit unit)
- {
- ArchiveDeployment dep = newDeployment(unit);
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setRuntimeClassLoader(unit.getClassLoader());
- dep.setType(getDeploymentType());
-
- Service service = dep.getService();
-
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment == null)
- throw new IllegalStateException("Deployment unit does not contain ejb3 deployment");
-
- // Copy the attachments
- dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
-
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- if (isWebServiceBean(container))
- {
- String ejbName = container.getEjbName();
- String epBean = container.getBeanClassName();
-
- // Create the endpoint
- Endpoint ep = newEndpoint(epBean);
- ep.setShortName(ejbName);
- service.addEndpoint(ep);
- }
- }
-
- return dep;
- }
-
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment == null)
- return false;
-
- boolean isWebServiceDeployment = false;
-
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- if (isWebServiceBean(container))
- {
- isWebServiceDeployment = true;
- break;
- }
- }
-
- return isWebServiceDeployment;
- }
-
- private boolean isWebServiceBean(EJBContainer container)
- {
- boolean isWebServiceBean = false;
- if (container instanceof StatelessContainer || container instanceof MessagingContainer)
- {
- boolean isWebService = container.resolveAnnotation(WebService.class) != null;
- boolean isWebServiceProvider = container.resolveAnnotation(WebServiceProvider.class) != null;
- isWebServiceBean = isWebService || isWebServiceProvider;
- }
- return isWebServiceBean;
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-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;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * @version $Revision$
- */
-public class JAXWSDeployerHookPostJSE extends DeployerHookPostJSE
-{
- /**
- * Expects the 'create' step to be executed in
- * {@link org.jboss.wsf.container.jboss50.JAXWSDeployerHookPreJSE} and
- * executes the 'start' step.
- *
- */
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- Deployment dep = getDeployment(unit);
- if (null == dep || Deployment.DeploymentState.CREATED != dep.getState())
- 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()
- {
- return Deployment.DeploymentType.JAXWS_JSE;
- }
-
- /**
- * Reject JAX-RPC deployments.
- *
- * @param unit
- * @return
- */
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);// JAX-RPC artefact
- return (wsMetaData == null && super.isWebServiceDeployment(unit));
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPreJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,142 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.metadata.serviceref.VirtualFileAdaptor;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Service;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A deployer JAXWS JSE Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-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()
- {
- return DeploymentType.JAXWS_JSE;
- }
-
- @Override
- public Deployment createDeployment(DeploymentUnit unit)
- {
- ArchiveDeployment dep = newDeployment(unit);
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
- dep.setType(getDeploymentType());
-
- Service service = dep.getService();
-
- JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- if (webMetaData == null)
- throw new IllegalStateException("Deployment unit does not contain web meta data");
-
- // Copy the attachments
- dep.addAttachment(JBossWebMetaData.class, webMetaData);
-
- List<ServletMetaData> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
- for (ServletMetaData servlet : servlets)
- {
- String servletName = servlet.getName();
- String targetBean = getTargetBean(servlet);
-
- // Create the endpoint
- Endpoint ep = newEndpoint(targetBean);
- ep.setShortName(servletName);
- service.addEndpoint(ep);
- }
-
- return dep;
- }
-
- @Override
- public boolean isWebServiceDeployment(DeploymentUnit unit)
- {
- if (super.isWebServiceDeployment(unit) == false)
- return false;
-
- boolean isWebServiceDeployment = false;
- try
- {
- JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- List<ServletMetaData> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
- isWebServiceDeployment = servlets.size() > 0;
- }
- catch (Exception ex)
- {
- log.error("Cannot process web deployment", ex);
- }
-
- return isWebServiceDeployment;
- }
-
- private List<ServletMetaData> getRelevantServlets(JBossWebMetaData webMetaData, ClassLoader loader)
- {
- List<ServletMetaData> servlets = new ArrayList<ServletMetaData>();
- for (ServletMetaData servlet : webMetaData.getServlets())
- {
- String servletClassName = getTargetBean(servlet);
-
- // Skip JSPs
- if (servletClassName == null || servletClassName.length() == 0)
- continue;
-
- try
- {
- Class<?> servletClass = loader.loadClass(servletClassName.trim());
- boolean isWebService = servletClass.isAnnotationPresent(WebService.class);
- boolean isWebServiceProvider = servletClass.isAnnotationPresent(WebServiceProvider.class);
- if (isWebService || isWebServiceProvider)
- servlets.add(servlet);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + servletClassName);
- continue;
- }
- }
- return servlets;
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,206 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.ear.jboss.JBossAppMetaData;
-import org.jboss.metadata.ear.spec.ModuleMetaData;
-import org.jboss.metadata.ear.spec.WebModuleMetaData;
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
-import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
-
-/**
- * Build container independent web meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class JSEArchiveMetaDataAdapter
-{
- // logging support
- private static Logger log = Logger.getLogger(JSEArchiveMetaDataAdapter.class);
-
- public JSEArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
- {
- String contextRoot = null;
-
- JBossWebMetaData jbossWebMetaData = unit.getAttachment(JBossWebMetaData.class);
- dep.addAttachment(JBossWebMetaData.class, jbossWebMetaData);
-
- if (unit.getParent() != null)
- {
- JBossAppMetaData appmd = unit.getParent().getAttachment(JBossAppMetaData.class);
- if (appmd != null)
- {
- ModuleMetaData module = appmd.getModule(dep.getSimpleName());
- if (module != null)
- {
- WebModuleMetaData web = (WebModuleMetaData) module.getValue();
- contextRoot = web.getContextRoot();
- }
- }
- }
-
- if (contextRoot == null)
- contextRoot = jbossWebMetaData.getContextRoot();
-
- JSEArchiveMetaData umd = new JSEArchiveMetaData();
- umd.setContextRoot(contextRoot);
- umd.setServletMappings(getServletMappings(jbossWebMetaData));
- umd.setServletClassNames(getServletClassMap(jbossWebMetaData));
- umd.setSecurityDomain(jbossWebMetaData.getSecurityDomain());
- umd.setPublishLocationAdapter(getPublishLocationAdpater(jbossWebMetaData));
- umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
-
- setConfigNameAndFile(umd, jbossWebMetaData);
-
- return umd;
- }
-
- private void setConfigNameAndFile(JSEArchiveMetaData umd, JBossWebMetaData jbossWebMetaData)
- {
- String configName = null;
- String configFile = null;
-
- WebserviceDescriptionsMetaData wsDescriptions = jbossWebMetaData.getWebserviceDescriptions();
- if (wsDescriptions != null && wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not supported");
-
- if (wsDescriptions != null && wsDescriptions.size() > 0)
- {
- WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
- configName = wsd.getConfigName();
- configFile = wsd.getConfigFile();
- }
-
- List<ParamValueMetaData> contextParams = jbossWebMetaData.getContextParams();
- if (contextParams != null)
- {
- for (ParamValueMetaData ctxParam : contextParams)
- {
- if (ctxParam.getParamName().equals("jbossws-config-name"))
- configName = ctxParam.getParamValue();
- if (ctxParam.getParamName().equals("jbossws-config-file"))
- configFile = ctxParam.getParamValue();
- }
- }
-
- umd.setConfigName(configName);
- umd.setConfigFile(configFile);
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final JBossWebMetaData wmd)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- WebserviceDescriptionsMetaData wsdmd = wmd.getWebserviceDescriptions();
- WebserviceDescriptionMetaData wsmd = wsdmd.get(name);
- String location = null;
- if (wsmd != null)
- location = wsmd.getWsdlPublishLocation();
- return location;
- }
- };
- }
-
- protected List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraints)
- {
- ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new ArrayList<JSESecurityMetaData>();
- if (securityConstraints != null)
- {
- for (SecurityConstraintMetaData securityMetaData : securityConstraints)
- {
- JSESecurityMetaData current = new JSESecurityMetaData();
- unifiedsecurityMetaData.add(current);
-
- current.setTransportGuarantee(securityMetaData.getTransportGuarantee().name());
-
- WebResourceCollectionsMetaData resources = securityMetaData.getResourceCollections();
- for (WebResourceCollectionMetaData webResource : resources)
- {
- JSEResourceCollection currentResource = current.addWebResource(webResource.getName());
- for (String currentPattern : webResource.getUrlPatterns())
- {
- currentResource.addPattern(currentPattern);
- }
- }
- }
- }
- return unifiedsecurityMetaData;
- }
-
- private Map<String, String> getServletMappings(JBossWebMetaData wmd)
- {
- Map<String, String> mappings = new HashMap<String, String>();
- List<ServletMappingMetaData> smappings = wmd.getServletMappings();
- if (smappings != null)
- {
- for(ServletMappingMetaData mapping : smappings)
- {
- // FIXME - Add support for multiple mappings
- mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
- }
- }
- return mappings;
- }
-
- private Map<String, String> getServletClassMap(JBossWebMetaData wmd)
- {
- Map<String, String> mappings = new HashMap<String, String>();
- JBossServletsMetaData servlets = wmd.getServlets();
- if (servlets != null)
- {
- for (ServletMetaData servlet : servlets)
- {
- // Skip JSPs
- if (servlet.getServletClass() == null || servlet.getServletClass().length() == 0)
- continue;
-
- mappings.put(servlet.getName(), servlet.getServletClass());
- }
- }
- return mappings;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,173 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.ListenerMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-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.WSFRuntime;
-
-/**
- * A deployer that modifies the web.xml meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep, WSFRuntime runtime)
- {
- String servletClass = (String)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CLASS);
- if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " + WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CLASS);
-
- modifyServletClass(dep, servletClass);
-
- String listenerClass = (String)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
- if (listenerClass != null)
- modifyListener(dep, listenerClass);
-
- Map<String, String> contextParams = (Map<String, String>)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
- if (contextParams != null)
- modifyContextParams(dep, contextParams);
- }
-
- private void modifyServletClass(Deployment dep, String servletClass)
- {
- JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
- if (webMetaData != null)
- {
- for (ServletMetaData servlet : webMetaData.getServlets())
- {
- String endpointClass = servlet.getServletClass();
-
- // JSP
- if (endpointClass == null || endpointClass.length() == 0)
- {
- log.debug("Ignore servlet class: " + endpointClass);
- continue;
- }
-
- // Nothing to do if we have an <init-param>
- if (!isAlreadyModified(servlet) && !isJavaxServlet(endpointClass, dep.getInitialClassLoader()))
- {
- servlet.setServletClass(servletClass);
- ParamValueMetaData initParam = new ParamValueMetaData();
- initParam.setParamName(Endpoint.SEPID_DOMAIN_ENDPOINT);
- initParam.setParamValue(endpointClass);
- List<ParamValueMetaData> initParams = servlet.getInitParam();
- if (initParams == null)
- {
- initParams = new ArrayList<ParamValueMetaData>();
- servlet.setInitParam(initParams);
- }
- initParams.add(initParam);
- }
- }
- }
- }
-
- private void modifyListener(Deployment dep, String listenerClass)
- {
- JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
- if (webMetaData != null)
- {
- ListenerMetaData listener = new ListenerMetaData();
- listener.setListenerClass(listenerClass);
- List<ListenerMetaData> listeners = webMetaData.getListeners();
- if (listeners == null)
- {
- listeners = new ArrayList<ListenerMetaData>();
- webMetaData.setListeners(listeners);
- }
- listeners.add(listener);
- }
- }
-
- private void modifyContextParams(Deployment dep, Map<String, String> newParams)
- {
- JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
- if (webMetaData != null)
- {
- for (Map.Entry<String, String> entry : newParams.entrySet())
- {
- ParamValueMetaData ctxParam = new ParamValueMetaData();
- ctxParam.setParamName(entry.getKey());
- ctxParam.setParamValue(entry.getValue());
- List<ParamValueMetaData> contextParams = webMetaData.getContextParams();
- if (contextParams == null)
- {
- contextParams = new ArrayList<ParamValueMetaData>();
- webMetaData.setContextParams(contextParams);
- }
- contextParams.add(ctxParam);
- }
- }
- }
-
- private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
- {
- boolean isServlet = false;
- if (loader != null)
- {
- try
- {
- Class servletClass = loader.loadClass(orgServletClass);
- isServlet = javax.servlet.Servlet.class.isAssignableFrom(servletClass);
- if (isServlet == true)
- {
- log.info("Ignore servlet: " + orgServletClass);
- }
- }
- catch (ClassNotFoundException e)
- {
- log.warn("Cannot load servlet class: " + orgServletClass);
- }
- }
- return isServlet;
- }
-
- private boolean isAlreadyModified(ServletMetaData servlet)
- {
- List<ParamValueMetaData> initParams = servlet.getInitParam();
- if (initParams != null)
- {
- for (ParamValueMetaData param : initParams)
- {
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(param.getParamName()))
- return true;
- }
- }
- return false;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RewriteResults.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import java.net.URL;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class RewriteResults
-{
- // The URL to the rewritten web.xml
- public URL webXML;
- // Maps the servlet name to the target bean
- public Map<String, String> sepTargetMap = new HashMap<String, String>();
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-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.WSFRuntime;
-import org.jboss.ejb3.Ejb3Deployment;
-
-/**
- * Determines the correct runtime loader for per deployment type
- * and makes it available through the {@link Deployment}.
- *
- * @author Heiko.Braun(a)jboss.com
- */
-public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
-{
-
- public void start(Deployment dep, WSFRuntime runtime)
- {
-
- // JSE endpoints
- if (dep.getAttachment(JBossWebMetaData.class) != null)
- {
- JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
- ClassLoader classLoader = webMetaData.getContextLoader();
- dep.setRuntimeClassLoader(classLoader);
- }
-
- // EJB3 endpoints
- else if (dep.getAttachment(Ejb3Deployment.class) != null)
- {
- dep.setRuntimeClassLoader(dep.getInitialClassLoader());
- }
-
- // EJB21 endpoints
- else if (dep.getAttachment(JBossMetaData.class) != null)
- {
- dep.setRuntimeClassLoader(dep.getInitialClassLoader());
- }
-
- else
- {
- throw new IllegalArgumentException("Unable to determine runtime loader");
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdapterFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.invocation.SecurityAdaptor;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 24, 2007
- */
-public class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
-{
- public SecurityAdaptor newSecurityAdapter()
- {
- return new SecurityAdaptorImpl();
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdaptorImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdaptorImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityAdaptorImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.security.SecurityAssociation;
-import org.jboss.wsf.spi.invocation.SecurityAdaptor;
-
-import java.security.Principal;
-
-/**
- * A JBoss specific SecurityAssociationAdaptor
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class SecurityAdaptorImpl implements SecurityAdaptor
-{
- SecurityAdaptorImpl()
- {
- }
-
- public Principal getPrincipal()
- {
- return SecurityAssociation.getPrincipal();
- }
-
- public void setPrincipal(Principal pricipal)
- {
- SecurityAssociation.setPrincipal(pricipal);
- }
-
- public Object getCredential()
- {
- return SecurityAssociation.getCredential();
- }
-
- public void setCredential(Object credential)
- {
- SecurityAssociation.setCredential(credential);
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import org.dom4j.Element;
-import org.jboss.metadata.common.ejb.IAssemblyDescriptorMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData;
-import org.jboss.metadata.ejb.spec.EjbJarMetaData;
-import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.SecurityHandler;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2006
- */
-public class SecurityHandlerEJB21 implements SecurityHandler
-{
- public void addSecurityDomain(Element jbossWeb, Deployment dep)
- {
- EJBArchiveMetaData ejbMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (ejbMetaData == null)
- throw new IllegalStateException("Cannot obtain application meta data");
-
- String securityDomain = ejbMetaData.getSecurityDomain();
- if (securityDomain != null)
- {
- if (securityDomain.startsWith("java:/jaas/") == false)
- securityDomain = "java:/jaas/" + securityDomain;
-
- jbossWeb.addElement("security-domain").addText(securityDomain);
- }
- }
-
- public void addSecurityRoles(Element webApp, Deployment dep)
- {
- // Fix: http://jira.jboss.org/jira/browse/JBWS-309
- JBossMetaData jbmd = dep.getAttachment(JBossMetaData.class);
- IAssemblyDescriptorMetaData assemblyDescriptor = jbmd.getAssemblyDescriptor();
- if (assemblyDescriptor != null)
- {
- SecurityRolesMetaData srmd = assemblyDescriptor.getSecurityRoles();
- if (srmd != null)
- {
- Iterator it = srmd.keySet().iterator();
- while (it.hasNext())
- {
- webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
- }
- }
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import java.util.Iterator;
-
-import javax.annotation.security.RolesAllowed;
-
-import org.dom4j.Element;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.annotation.SecurityDomain;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.SecurityHandler;
-
-/**
- * Generate a service endpoint deployment for EJB endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2006
- */
-public class SecurityHandlerEJB3 implements SecurityHandler
-{
- public void addSecurityDomain(Element jbossWeb, Deployment dep)
- {
- String securityDomain = null;
-
- Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
- if (anSecurityDomain != null)
- {
- if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
- throw new IllegalStateException("Multiple security domains not supported");
-
- securityDomain = anSecurityDomain.value();
- }
- }
- }
-
- if (securityDomain != null)
- {
- if (securityDomain.startsWith("java:/jaas/") == false)
- securityDomain = "java:/jaas/" + securityDomain;
-
- jbossWeb.addElement("security-domain").addText(securityDomain);
- }
- }
-
- public void addSecurityRoles(Element webApp, Deployment dep)
- {
- Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
- if (anRolesAllowed != null)
- {
- for (String role : anRolesAllowed.value())
- {
- webApp.addElement("security-role").addElement("role-name").addText(role);
- }
- }
- }
- }
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/ServiceEndpointInterceptor.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.ejb.plugins.AbstractInterceptor;
-import org.jboss.invocation.InvocationKey;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.invocation.HandlerCallback;
-import org.jboss.wsf.spi.invocation.Invocation;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-
-/**
- * This Interceptor does the ws4ee handler processing.
- *
- * According to the ws4ee spec the handler logic must be invoked after the container
- * applied method level security to the invocation.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Sep-2005
- */
-public class ServiceEndpointInterceptor extends AbstractInterceptor
-{
- // provide logging
- private static Logger log = Logger.getLogger(ServiceEndpointInterceptor.class);
-
- // Interceptor implementation --------------------------------------
-
- /** Before and after we call the service endpoint bean, we process the handler chains.
- */
- public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
- {
- // If no msgContext, it's not for us
- SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
- if (msgContext == null)
- {
- return getNext().invoke(jbInv);
- }
-
- // Get the endpoint invocation
- Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());
-
- // Get the handler callback
- HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());
-
- // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
- if (callback != null && wsInv != null)
- {
- try
- {
- // call the request handlers
- boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
- handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);
-
- // Call the next interceptor in the chain
- if (handlersPass)
- {
- // The SOAPContentElements stored in the EndpointInvocation might have changed after
- // handler processing. Get the updated request payload. This should be a noop if request
- // handlers did not modify the incomming SOAP message.
- Object[] reqParams = wsInv.getArgs();
- jbInv.setArguments(reqParams);
- Object resObj = getNext().invoke(jbInv);
-
- // Setting the message to null should trigger binding of the response message
- msgContext.setMessage(null);
- wsInv.setReturnValue(resObj);
- }
-
- // call the response handlers
- handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
- handlersPass = handlersPass && callback.callResponseHandlerChain(wsInv, HandlerType.ENDPOINT);
-
- // update the return value after response handler processing
- Object resObj = wsInv.getReturnValue();
-
- return resObj;
- }
- catch (Exception ex)
- {
- try
- {
- // call the fault handlers
- boolean handlersPass = callback.callFaultHandlerChain(wsInv, HandlerType.POST, ex);
- handlersPass = handlersPass && callback.callFaultHandlerChain(wsInv, HandlerType.ENDPOINT, ex);
- }
- catch (Exception subEx)
- {
- log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
- }
- throw ex;
- }
- finally
- {
- // do nothing
- }
- }
- else
- {
- log.warn("Handler callback not available");
- return getNext().invoke(jbInv);
- }
- }
-}
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebAppDesciptorModifier.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.container.jboss50;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.RewriteResults;
import org.jboss.wsf.spi.deployment.Deployment;
import org.dom4j.Document;
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceContextFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-import org.jboss.wsf.spi.invocation.*;
-
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 25, 2007
- */
-public class WebServiceContextFactoryImpl extends WebServiceContextFactory
-{
- public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
- {
- ExtensibleWebServiceContext context = null;
-
- if(type.toString().indexOf("EJB")!=-1 || type.toString().indexOf("MDB")!=-1)
- context = new WebServiceContextEJB(messageContext);
- else
- context = new WebServiceContextJSE(messageContext);
-
- return context;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerEJB.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-/**
- * This web service deployer for EJB
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public class WebServiceDeployerEJB extends AbstractWebServiceDeployer
-{
- private int relOrderEJB2x;
- private int relOrderEJB3;
-
- public void setRelOrderEJB2x(int relOrderEJB2x)
- {
- this.relOrderEJB2x = relOrderEJB2x;
- }
-
- public void setRelOrderEJB3(int relOrderEJB3)
- {
- this.relOrderEJB3 = relOrderEJB3;
- }
-
- @Override
- public int getRelativeOrder()
- {
- return Math.max(relOrderEJB2x, relOrderEJB3) + 1;
- }
-
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-/**
- * @author Heiko.Braun(a)jboss.com
- */
-public class WebServiceDeployerPostJSE extends AbstractWebServiceDeployer
-{
- private int relOrderWar;
-
-
- public void setRelOrderWar(int relOrder)
- {
- this.relOrderWar = relOrder;
- }
-
- @Override
- public int getRelativeOrder()
- {
- return relOrderWar + 1;
- }
-}
\ No newline at end of file
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-/**
- * This web service deployer for JSE
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public class WebServiceDeployerPreJSE extends AbstractWebServiceDeployer
-{
- private int relOrderWar;
-
- public void setRelOrderWar(int relOrderWar)
- {
- this.relOrderWar = relOrderWar;
- }
-
- @Override
- public int getRelativeOrder()
- {
- return relOrderWar - 1;
- }
-}
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceMainDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceMainDeployer.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebServiceMainDeployer.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-/**
- * The main web service deployer
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public class WebServiceMainDeployer extends AbstractWebServiceDeployer
-{
- private int relOrderJSE;
- private int relOrderEJB;
-
- public void setRelOrderEJB(int relOrderEJB)
- {
- this.relOrderEJB = relOrderEJB;
- }
-
- public void setRelOrderJSE(int relOrderJSE)
- {
- this.relOrderJSE = relOrderJSE;
- }
-
- @Override
- public int getRelativeOrder()
- {
- return Math.max(relOrderEJB, relOrderJSE) + 1;
- }
-}
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java 2008-05-16 10:41:38 UTC (rev 7057)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/WebXMLRewriterImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -23,6 +23,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.common.IOUtils;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.RewriteResults;
import org.dom4j.io.SAXReader;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+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.*;
+
+//$Id$
+
+
+/**
+ * An abstract web service deployer.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.com
+ *
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHook implements DeployerHook
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ protected String runtimeName;
+ private WSFRuntime wsfRuntime;
+
+ private DeploymentModelFactory deploymentModelFactory;
+
+ public String getRuntimeName()
+ {
+ return runtimeName;
+ }
+
+ public void setRuntimeName(String runtimeName)
+ {
+ this.runtimeName = runtimeName;
+ }
+
+ public WSFRuntime getWsfRuntime()
+ {
+ if(null == wsfRuntime)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ wsfRuntime = spiProvider.getSPI(WSFRuntimeLocator.class).locateRuntime(runtimeName);
+ }
+
+ return wsfRuntime;
+ }
+
+ public void setWsfRuntime(WSFRuntime wsfRuntime)
+ {
+ this.wsfRuntime = wsfRuntime;
+ }
+
+ public DeploymentModelFactory getDeploymentModelFactory()
+ {
+ if(null == deploymentModelFactory)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ }
+
+ return deploymentModelFactory;
+ }
+
+ public ArchiveDeployment newDeployment(DeploymentUnit unit)
+ {
+ try
+ {
+ DeploymentModelFactory factory = getDeploymentModelFactory();
+ ArchiveDeployment dep = (ArchiveDeployment)factory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
+ if (unit.getParent() != null)
+ {
+ DeploymentUnit parentUnit = unit.getParent();
+ ArchiveDeployment parentDep = (ArchiveDeployment)factory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
+ dep.setParent(parentDep);
+ }
+ return dep;
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException("Cannot load spi.deployment.Deployment class", ex);
+ }
+ }
+
+ public Endpoint newEndpoint(String targetBean)
+ {
+ try
+ {
+ return getDeploymentModelFactory().newEndpoint(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException("Cannot load spi.deployment.Endpoint class", ex);
+ }
+ }
+
+ /** Return true if this deployment should be ignored
+ */
+ public boolean ignoreDeployment(DeploymentUnit unit)
+ {
+ String name = unit.getName();
+ return (name.startsWith("jboss:id=") && name.indexOf("service=jacc") > 0);
+ }
+
+ /** Get the deployment type this deployer can handle
+ */
+ public abstract Deployment.DeploymentType getDeploymentType();
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.wsf.spi.deployment.Deployment;
+
+//$Id$
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+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);
+ if(null==dep || Deployment.DeploymentState.CREATED != dep.getState())
+ throw new DeploymentException("Create step failed");
+
+ // execute the 'start' step
+ getWsfRuntime().start(dep);
+
+ }
+
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.wsf.container.jboss50.WebAppDesciptorModifier;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookJSE extends ArchiveDeployerHook
+{
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
+ boolean isGenerated = Boolean.TRUE.equals(unit.getAttachment(WebAppDesciptorModifier.PROPERTY_GENERATED_WEBAPP));
+ return webMetaData != null && isGenerated == false;
+ }
+
+ protected String getTargetBean(ServletMetaData servlet)
+ {
+ String endpointClass = servlet.getServletClass();
+ List<ParamValueMetaData> initParams = servlet.getInitParam();
+ if (initParams != null)
+ {
+ for (ParamValueMetaData param : initParams)
+ {
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(param.getParamName()))
+ {
+ endpointClass = param.getParamValue();
+ break;
+ }
+ }
+ }
+ return endpointClass;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+
+/**
+ * This deployer that calls the registered DeployerHooks
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public abstract class AbstractWebServiceDeployer<T> extends AbstractComponentDeployer
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(AbstractWebServiceDeployer.class);
+
+ private List<DeployerHook> deployerHooks = new LinkedList<DeployerHook>();
+
+ public void addDeployerHook(DeployerHook deployer)
+ {
+ log.debug("Add deployer hook: " + deployer);
+ deployerHooks.add(deployer);
+ }
+
+ public void removeDeployerHook(DeployerHook deployer)
+ {
+ log.debug("Remove deployer hook: " + deployer);
+ deployerHooks.remove(deployer);
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ for (DeployerHook deployer : deployerHooks)
+ deployer.deploy(unit);
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ for (DeployerHook deployer : deployerHooks)
+ deployer.undeploy(unit);
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.w3c.dom.Element;
+
+import java.net.URL;
+
+/**
+ * An abstract web service deployer.
+ *
+ * deploy(unit)
+ * if(isWebServiceDeployment)
+ * dep = createDeployment(unit)
+ * deploy(dep)
+ *
+ * undeploy(unit)
+ * dep = getDeployment(unit)
+ * undeploy(dep)
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class ArchiveDeployerHook extends AbstractDeployerHook
+{
+
+ /** Depending on the type of deployment, this method should return true
+ * if the deployment contains web service endpoints.
+ */
+ public abstract boolean isWebServiceDeployment(DeploymentUnit unit);
+
+ /** Create the Deployment for a given DeploymentUnit
+ */
+ public abstract Deployment createDeployment(DeploymentUnit unit);
+
+ /** Get the Deployment for a given DeploymentUnit
+ */
+ public Deployment getDeployment(DeploymentUnit unit)
+ {
+ Deployment dep = unit.getAttachment(Deployment.class);
+ return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ if (isWebServiceDeployment(unit))
+ {
+ log.debug("deploy: " + unit.getName());
+ Deployment dep = getDeployment(unit);
+ if (dep == null)
+ {
+ dep = createDeployment(unit);
+ dep.addAttachment(DeploymentUnit.class, unit);
+ }
+
+ getWsfRuntime().create(dep);
+ unit.addAttachment(Deployment.class, dep);
+ }
+ }
+
+ public void undeploy(DeploymentUnit unit)
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ Deployment dep = getDeployment(unit);
+ if (dep != null)
+ {
+ log.debug("undeploy: " + unit.getName());
+ getWsfRuntime().stop(dep);
+ getWsfRuntime().destroy(dep);
+ }
+ }
+
+ /** Unmrashall the webservices.xml if there is one
+ */
+ protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
+ {
+ WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
+ UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
+ if (wsMetaData == null && vfWebservices != null)
+ {
+ try
+ {
+ URL wsURL = vfWebservices.toURL();
+ Element root = DOMUtils.parse(wsURL.openStream());
+ String namespaceURI = root.getNamespaceURI();
+ if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
+ {
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new WebservicesFactory(wsURL);
+ wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
+ unit.addAttachment(WebservicesMetaData.class, wsMetaData);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new WSFDeploymentException(ex);
+ }
+ }
+ return wsMetaData;
+ }
+
+ private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit)
+ {
+ VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml");
+ return (vf != null ? new VirtualFileAdaptor(vf) : null);
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHook.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHook.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHook.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * An interface for all web service deployer hooks
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public interface DeployerHook
+{
+ void deploy(DeploymentUnit unit) throws DeploymentException;
+
+ void undeploy(DeploymentUnit unit);
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHookPostJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.wsf.spi.deployment.Deployment;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public abstract class DeployerHookPostJSE extends AbstractDeployerHookJSE
+{
+ /**
+ * The deployment should be created in phase 1.
+ */
+ public Deployment createDeployment(DeploymentUnit unit)
+ {
+ Deployment dep = unit.getAttachment(Deployment.class);
+ if (null == dep)
+ throw new IllegalStateException("spi.Deployment missing. It should be created in Phase 1");
+
+ return dep;
+ }
+
+ /**
+ * A phase 2 deployer hook needs to reject first-place
+ * JSE deployments and wait for those that are re-written.
+ * We rely on the fact that spi.Deployment is created in phase 1.
+ */
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ Deployment deployment = unit.getAttachment(Deployment.class);
+ return deployment != null;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/DeployerHookPostJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookEJB21.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+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.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookEJB21 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_EJB21;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentUnit unit)
+ {
+ ArchiveDeployment dep = newDeployment(unit);
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRuntimeClassLoader(unit.getClassLoader());
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ JBossMetaData jbmd = unit.getAttachment(JBossMetaData.class);
+ if (jbmd == null)
+ throw new IllegalStateException("Deployment unit does not contain application meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.addAttachment(JBossMetaData.class, jbmd);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String ejbLink = pcmd.getEjbLink();
+ if (ejbLink == null)
+ throw new IllegalStateException("ejb-link cannot be null");
+
+ JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbLink);
+ if (beanMetaData == null)
+ throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);
+
+ String ejbClass = beanMetaData.getEjbClass();
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(ejbClass);
+ ep.setShortName(ejbLink);
+ service.addEndpoint(ep);
+ }
+ }
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+ return wsMetaData != null && unit.getAllMetaData(JBossMetaData.class).size() > 0;
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPostJSE extends DeployerHookPostJSE
+{
+ /** Get the deployment type this deployer can handle
+ */
+ public Deployment.DeploymentType getDeploymentType()
+ {
+ return Deployment.DeploymentType.JAXRPC_JSE;
+ }
+
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+ return (wsMetaData!=null && super.isWebServiceDeployment(unit));
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+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.Service;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+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()
+ {
+ return DeploymentType.JAXRPC_JSE;
+ }
+
+ /**
+ * Create an endpoint for every servlet-link in webservices.xml
+ */
+ @Override
+ public Deployment createDeployment(DeploymentUnit unit)
+ {
+ ArchiveDeployment dep = newDeployment(unit);
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRuntimeClassLoader(null);
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.addAttachment(JBossWebMetaData.class, webMetaData);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String servletLink = pcmd.getServletLink();
+ if (servletLink == null)
+ throw new IllegalStateException("servlet-link cannot be null");
+
+ ServletMetaData servlet = getServletForName(webMetaData, servletLink);
+ String targetBean = getTargetBean(servlet);
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(targetBean);
+ ep.setShortName(servletLink);
+ service.addEndpoint(ep);
+ }
+ }
+
+ return dep;
+ }
+
+ private ServletMetaData getServletForName(JBossWebMetaData wmd, String servletLink)
+ {
+ for (JBossServletMetaData servlet : wmd.getServlets())
+ {
+ if (servletLink.equals(servlet.getName()))
+ {
+ return servlet;
+ }
+ }
+ throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);
+ return wsMetaData != null;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookEJB3.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.mdb.MessagingContainer;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+import java.util.Iterator;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookEJB3 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXWS_EJB3;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentUnit unit)
+ {
+ ArchiveDeployment dep = newDeployment(unit);
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRuntimeClassLoader(unit.getClassLoader());
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment == null)
+ throw new IllegalStateException("Deployment unit does not contain ejb3 deployment");
+
+ // Copy the attachments
+ dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
+
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ if (isWebServiceBean(container))
+ {
+ String ejbName = container.getEjbName();
+ String epBean = container.getBeanClassName();
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(epBean);
+ ep.setShortName(ejbName);
+ service.addEndpoint(ep);
+ }
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment == null)
+ return false;
+
+ boolean isWebServiceDeployment = false;
+
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ if (isWebServiceBean(container))
+ {
+ isWebServiceDeployment = true;
+ break;
+ }
+ }
+
+ return isWebServiceDeployment;
+ }
+
+ private boolean isWebServiceBean(EJBContainer container)
+ {
+ boolean isWebServiceBean = false;
+ if (container instanceof StatelessContainer || container instanceof MessagingContainer)
+ {
+ boolean isWebService = container.resolveAnnotation(WebService.class) != null;
+ boolean isWebServiceProvider = container.resolveAnnotation(WebServiceProvider.class) != null;
+ isWebServiceBean = isWebService || isWebServiceProvider;
+ }
+ return isWebServiceBean;
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+// $Id$
+
+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;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class JAXWSDeployerHookPostJSE extends DeployerHookPostJSE
+{
+ /**
+ * 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);
+ if (null == dep || Deployment.DeploymentState.CREATED != dep.getState())
+ 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()
+ {
+ return Deployment.DeploymentType.JAXWS_JSE;
+ }
+
+ /**
+ * Reject JAX-RPC deployments.
+ *
+ * @param unit
+ * @return
+ */
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit);// JAX-RPC artefact
+ return (wsMetaData == null && super.isWebServiceDeployment(unit));
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+//$Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+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()
+ {
+ return DeploymentType.JAXWS_JSE;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentUnit unit)
+ {
+ ArchiveDeployment dep = newDeployment(unit);
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setType(getDeploymentType());
+
+ Service service = dep.getService();
+
+ JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ // Copy the attachments
+ dep.addAttachment(JBossWebMetaData.class, webMetaData);
+
+ List<ServletMetaData> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
+ for (ServletMetaData servlet : servlets)
+ {
+ String servletName = servlet.getName();
+ String targetBean = getTargetBean(servlet);
+
+ // Create the endpoint
+ Endpoint ep = newEndpoint(targetBean);
+ ep.setShortName(servletName);
+ service.addEndpoint(ep);
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentUnit unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ boolean isWebServiceDeployment = false;
+ try
+ {
+ JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
+ List<ServletMetaData> servlets = getRelevantServlets(webMetaData, unit.getClassLoader());
+ isWebServiceDeployment = servlets.size() > 0;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot process web deployment", ex);
+ }
+
+ return isWebServiceDeployment;
+ }
+
+ private List<ServletMetaData> getRelevantServlets(JBossWebMetaData webMetaData, ClassLoader loader)
+ {
+ List<ServletMetaData> servlets = new ArrayList<ServletMetaData>();
+ for (ServletMetaData servlet : webMetaData.getServlets())
+ {
+ String servletClassName = getTargetBean(servlet);
+
+ // Skip JSPs
+ if (servletClassName == null || servletClassName.length() == 0)
+ continue;
+
+ try
+ {
+ Class<?> servletClass = loader.loadClass(servletClassName.trim());
+ boolean isWebService = servletClass.isAnnotationPresent(WebService.class);
+ boolean isWebServiceProvider = servletClass.isAnnotationPresent(WebServiceProvider.class);
+ if (isWebService || isWebServiceProvider)
+ servlets.add(servlet);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClassName);
+ continue;
+ }
+ }
+ return servlets;
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+
+//$Id$
+
+/**
+ * This web service deployer for EJB
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceDeployerEJB extends AbstractWebServiceDeployer
+{
+ private int relOrderEJB2x;
+ private int relOrderEJB3;
+
+ public void setRelOrderEJB2x(int relOrderEJB2x)
+ {
+ this.relOrderEJB2x = relOrderEJB2x;
+ }
+
+ public void setRelOrderEJB3(int relOrderEJB3)
+ {
+ this.relOrderEJB3 = relOrderEJB3;
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ return Math.max(relOrderEJB2x, relOrderEJB3) + 1;
+ }
+
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPostJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPostJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPostJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+
+// $Id$
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ */
+public class WebServiceDeployerPostJSE extends AbstractWebServiceDeployer
+{
+ private int relOrderWar;
+
+
+ public void setRelOrderWar(int relOrder)
+ {
+ this.relOrderWar = relOrder;
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ return relOrderWar + 1;
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPostJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPreJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPreJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPreJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+
+//$Id$
+
+/**
+ * This web service deployer for JSE
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceDeployerPreJSE extends AbstractWebServiceDeployer
+{
+ private int relOrderWar;
+
+ public void setRelOrderWar(int relOrderWar)
+ {
+ this.relOrderWar = relOrderWar;
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ return relOrderWar - 1;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerPreJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+
+//$Id$
+
+/**
+ * The main web service deployer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 24-Apr-2007
+ */
+public class WebServiceMainDeployer extends AbstractWebServiceDeployer
+{
+ private int relOrderJSE;
+ private int relOrderEJB;
+
+ public void setRelOrderEJB(int relOrderEJB)
+ {
+ this.relOrderEJB = relOrderEJB;
+ }
+
+ public void setRelOrderJSE(int relOrderJSE)
+ {
+ this.relOrderJSE = relOrderJSE;
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ return Math.max(relOrderEJB, relOrderJSE) + 1;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment;
+
+// $Id$
+
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+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.WSFRuntime;
+import org.jboss.ejb3.Ejb3Deployment;
+
+/**
+ * Determines the correct runtime loader for per deployment type
+ * and makes it available through the {@link Deployment}.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ */
+public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
+{
+
+ public void start(Deployment dep, WSFRuntime runtime)
+ {
+
+ // JSE endpoints
+ if (dep.getAttachment(JBossWebMetaData.class) != null)
+ {
+ JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
+ ClassLoader classLoader = webMetaData.getContextLoader();
+ dep.setRuntimeClassLoader(classLoader);
+ }
+
+ // EJB3 endpoints
+ else if (dep.getAttachment(Ejb3Deployment.class) != null)
+ {
+ dep.setRuntimeClassLoader(dep.getInitialClassLoader());
+ }
+
+ // EJB21 endpoints
+ else if (dep.getAttachment(JBossMetaData.class) != null)
+ {
+ dep.setRuntimeClassLoader(dep.getInitialClassLoader());
+ }
+
+ else
+ {
+ throw new IllegalArgumentException("Unable to determine runtime loader");
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.metadata;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.container.jboss50.WebAppDesciptorModifier;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ContainerMetaDataAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ContainerMetaDataAdapter.class);
+
+ private EJBArchiveMetaDataAdapterEJB3 ejbMetaDataAdapterEJB3 = new EJBArchiveMetaDataAdapterEJB3();
+ private EJBArchiveMetaDataAdapterEJB21 ejbMetaDataAdapterEJB21 = new EJBArchiveMetaDataAdapterEJB21();
+ private JSEArchiveMetaDataAdapter webMetaDataAdapter = new JSEArchiveMetaDataAdapter();
+
+ public void setEjbMetaDataAdapterEJB21(EJBArchiveMetaDataAdapterEJB21 adapter)
+ {
+ this.ejbMetaDataAdapterEJB21 = adapter;
+ }
+
+ public void setEjbMetaDataAdapterEJB3(EJBArchiveMetaDataAdapterEJB3 adapter)
+ {
+ this.ejbMetaDataAdapterEJB3 = adapter;
+ }
+
+ public void setWebMetaDataAdapter(JSEArchiveMetaDataAdapter adapter)
+ {
+ this.webMetaDataAdapter = adapter;
+ }
+
+ public void buildContainerMetaData(Deployment dep, DeploymentUnit unit)
+ {
+ dep.addAttachment(DeploymentUnit.class, unit);
+
+ try
+ {
+ // JSE endpoints
+ if (unit.getAttachment(JBossWebMetaData.class) != null)
+ {
+ JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildMetaData(dep, unit);
+ if (webMetaData != null)
+ dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
+
+ if (dep instanceof ArchiveDeployment)
+ {
+ URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
+ dep.setProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_URL, webURL);
+ }
+ }
+
+ // EJB3 endpoints
+ else if (unit.getAttachment(Ejb3Deployment.class) != null)
+ {
+ EJBArchiveMetaData ejbMetaData = ejbMetaDataAdapterEJB3.buildMetaData(dep, unit);
+ if (ejbMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
+ }
+
+ // EJB21 endpoints
+ else if (unit.getAttachment(JBossMetaData.class) != null)
+ {
+ EJBArchiveMetaData ejbMetaData = ejbMetaDataAdapterEJB21.buildMetaData(dep, unit);
+ if (ejbMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.metadata;
+
+//$Id$
+
+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
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ContainerMetaDataDeploymentAspect extends DeploymentAspect
+{
+ private ContainerMetaDataAdapter metaDataAdapter = new ContainerMetaDataAdapter();
+
+ public void setMetaDataAdapter(ContainerMetaDataAdapter adapter)
+ {
+ this.metaDataAdapter = adapter;
+ }
+
+ @Override
+ public void create(Deployment dep, WSFRuntime runtime)
+ {
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit == null)
+ throw new IllegalStateException("Cannot obtain deployment unit");
+
+ metaDataAdapter.buildContainerMetaData(dep, unit);
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.metadata;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
+import org.jboss.metadata.javaee.spec.PortComponent;
+import org.jboss.wsf.spi.deployment.Deployment;
+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.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBArchiveMetaDataAdapterEJB21
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB21.class);
+
+ public EJBArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
+ {
+ JBossMetaData jbossMetaData = unit.getAttachment(JBossMetaData.class);
+ dep.addAttachment(JBossMetaData.class, jbossMetaData);
+
+ EJBArchiveMetaData ejbMetaData = new EJBArchiveMetaData();
+ buildEnterpriseBeansMetaData(ejbMetaData, jbossMetaData);
+ buildWebservicesMetaData(ejbMetaData, jbossMetaData);
+ ejbMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
+
+ return ejbMetaData;
+ }
+
+ private void buildEnterpriseBeansMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
+ {
+ List<EJBMetaData> targetBeans = new ArrayList<EJBMetaData>();
+ JBossEnterpriseBeansMetaData sourceBeans = jbossMetaData.getEnterpriseBeans();
+ Iterator<JBossEnterpriseBeanMetaData> it = sourceBeans.iterator();
+ while (it.hasNext())
+ {
+ JBossEnterpriseBeanMetaData bmd = it.next();
+ buildBeanMetaData(targetBeans, bmd);
+ }
+ ejbMetaData.setEnterpriseBeans(targetBeans);
+ }
+
+ private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbossMetaData)
+ {
+ WebservicesMetaData webservices = jbossMetaData.getWebservices();
+ if (webservices != null)
+ {
+ String contextRoot = webservices.getContextRoot();
+ ejbMetaData.setWebServiceContextRoot(contextRoot);
+
+ ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
+
+ WebserviceDescriptionsMetaData wsDescriptions = webservices.getWebserviceDescriptions();
+ if (wsDescriptions != null)
+ {
+ if (wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not supported");
+
+ if (wsDescriptions.size() > 0)
+ {
+ WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
+ ejbMetaData.setConfigName(wsd.getConfigName());
+ ejbMetaData.setConfigFile(wsd.getConfigFile());
+ }
+ }
+ }
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String wsdlPublishLocation = null;
+ WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
+ if (wsDescriptions != null && wsDescriptions.get(name) != null)
+ {
+ WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
+ wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
+ }
+ return wsdlPublishLocation;
+ }
+ };
+ }
+
+ private EJBMetaData buildBeanMetaData(List<EJBMetaData> ejbBeans, JBossEnterpriseBeanMetaData jbossBeansMetaData)
+ {
+ EJBMetaData targetBean = null;
+ if (jbossBeansMetaData.isSession())
+ {
+ targetBean = new SLSBMetaData();
+ JBossSessionBeanMetaData jbossSessionBean = (JBossSessionBeanMetaData)jbossBeansMetaData;
+
+ targetBean.setEjbName(jbossSessionBean.getEjbName());
+ targetBean.setEjbClass(jbossSessionBean.getEjbClass());
+ targetBean.setServiceEndpointInterface(jbossSessionBean.getServiceEndpoint());
+ targetBean.setHome(jbossSessionBean.getHome());
+ targetBean.setLocalHome(jbossSessionBean.getLocalHome());
+ targetBean.setJndiName(jbossSessionBean.determineJndiName());
+ targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
+
+ PortComponent pcmd = jbossSessionBean.getPortComponent();
+ if (pcmd != null)
+ {
+ targetBean.setPortComponentName(pcmd.getPortComponentName());
+ targetBean.setPortComponentURI(pcmd.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcmd.getAuthMethod());
+ smd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ targetBean.setSecurityMetaData(smd);
+ }
+ }
+ else if (jbossBeansMetaData.isMessageDriven())
+ {
+ targetBean = new MDBMetaData();
+ JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossBeansMetaData;
+
+ targetBean.setEjbName(jbossMessageBean.getEjbName());
+ targetBean.setEjbClass(jbossMessageBean.getEjbClass());
+ //targetBean.setServiceEndpointInterface(???);
+ //targetBean.setJndiName(???);
+ targetBean.setLocalJndiName(jbossBeansMetaData.getLocalJndiName());
+ ((MDBMetaData)targetBean).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
+ }
+
+ if (targetBean != null)
+ ejbBeans.add(targetBean);
+
+ return targetBean;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB3.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,185 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.metadata;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.Container;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.mdb.MessagingContainer;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossGenericBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData;
+import org.jboss.metadata.javaee.spec.PortComponent;
+import org.jboss.wsf.spi.deployment.Deployment;
+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.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Apr-2007
+ */
+public class EJBArchiveMetaDataAdapterEJB3
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB3.class);
+
+ public EJBArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
+ {
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
+
+ EJBArchiveMetaData umd = new EJBArchiveMetaData();
+ buildEnterpriseBeansMetaData(umd, ejb3Deployment);
+
+ JBossMetaData jbMetaData = unit.getAttachment(JBossMetaData.class);
+ if (jbMetaData != null)
+ buildWebservicesMetaData(umd, jbMetaData);
+
+ return umd;
+ }
+
+ private void buildWebservicesMetaData(EJBArchiveMetaData ejbMetaData, JBossMetaData jbMetaData)
+ {
+ WebservicesMetaData wsMetaData = jbMetaData.getWebservices();
+ if (wsMetaData != null)
+ {
+ String contextRoot = wsMetaData.getContextRoot();
+ ejbMetaData.setWebServiceContextRoot(contextRoot);
+
+ ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wsMetaData));
+
+ WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
+ if (wsDescriptions != null)
+ {
+ if (wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not supported");
+
+ if (wsDescriptions.size() > 0)
+ {
+ WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
+ ejbMetaData.setConfigName(wsd.getConfigName());
+ ejbMetaData.setConfigFile(wsd.getConfigFile());
+ }
+ }
+ }
+ }
+
+ private void buildEnterpriseBeansMetaData(EJBArchiveMetaData jarMetaData, Ejb3Deployment ejb3Deployment)
+ {
+ List<EJBMetaData> ejbMetaDataList = new ArrayList<EJBMetaData>();
+ Iterator<Container> it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+
+ EJBMetaData ejbMetaData = null;
+ PortComponent pcMetaData = null;
+ if (container instanceof StatelessContainer)
+ {
+ ejbMetaData = new SLSBMetaData();
+ JBossEnterpriseBeanMetaData beanMetaData = container.getXml();
+ if (beanMetaData instanceof JBossGenericBeanMetaData)
+ {
+ pcMetaData = ((JBossGenericBeanMetaData)beanMetaData).getPortComponent();
+ }
+ else if (beanMetaData instanceof JBossSessionBeanMetaData)
+ {
+ pcMetaData = ((JBossSessionBeanMetaData)beanMetaData).getPortComponent();
+ }
+ }
+ else if (container instanceof MessagingContainer)
+ {
+ ejbMetaData = new MDBMetaData();
+ MessagingContainer mdb = (MessagingContainer)container;
+ Map props = mdb.getActivationConfigProperties();
+ if (props != null)
+ {
+ ActivationConfigPropertyMetaData destProp = (ActivationConfigPropertyMetaData)props.get("destination");
+ if (destProp != null)
+ {
+ String destination = destProp.getValue();
+ ((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
+ }
+ }
+ }
+
+ if (ejbMetaData != null)
+ {
+ ejbMetaData.setEjbName(container.getEjbName());
+ ejbMetaData.setEjbClass(container.getBeanClassName());
+
+ if (pcMetaData != null)
+ {
+ ejbMetaData.setPortComponentName(pcMetaData.getPortComponentName());
+ ejbMetaData.setPortComponentURI(pcMetaData.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcMetaData.getAuthMethod());
+ smd.setTransportGuarantee(pcMetaData.getTransportGuarantee());
+ smd.setSecureWSDLAccess(pcMetaData.getSecureWSDLAccess());
+ ejbMetaData.setSecurityMetaData(smd);
+ }
+
+ ejbMetaDataList.add(ejbMetaData);
+ }
+ }
+
+ jarMetaData.setEnterpriseBeans(ejbMetaDataList);
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
+ {
+ return new PublishLocationAdapter() {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String wsdlPublishLocation = null;
+ WebserviceDescriptionsMetaData wsDescriptions = wsMetaData.getWebserviceDescriptions();
+ if (wsDescriptions != null && wsDescriptions.get(name) != null)
+ {
+ WebserviceDescriptionMetaData wsdMetaData = wsDescriptions.get(name);
+ wsdlPublishLocation = wsdMetaData.getWsdlPublishLocation();
+ }
+ return wsdlPublishLocation;
+ }
+ };
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/EJBArchiveMetaDataAdapterEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/JSEArchiveMetaDataAdapter.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/JSEArchiveMetaDataAdapter.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/JSEArchiveMetaDataAdapter.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,206 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.metadata;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ear.jboss.JBossAppMetaData;
+import org.jboss.metadata.ear.spec.ModuleMetaData;
+import org.jboss.metadata.ear.spec.WebModuleMetaData;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JSEArchiveMetaDataAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(JSEArchiveMetaDataAdapter.class);
+
+ public JSEArchiveMetaData buildMetaData(Deployment dep, DeploymentUnit unit)
+ {
+ String contextRoot = null;
+
+ JBossWebMetaData jbossWebMetaData = unit.getAttachment(JBossWebMetaData.class);
+ dep.addAttachment(JBossWebMetaData.class, jbossWebMetaData);
+
+ if (unit.getParent() != null)
+ {
+ JBossAppMetaData appmd = unit.getParent().getAttachment(JBossAppMetaData.class);
+ if (appmd != null)
+ {
+ ModuleMetaData module = appmd.getModule(dep.getSimpleName());
+ if (module != null)
+ {
+ WebModuleMetaData web = (WebModuleMetaData) module.getValue();
+ contextRoot = web.getContextRoot();
+ }
+ }
+ }
+
+ if (contextRoot == null)
+ contextRoot = jbossWebMetaData.getContextRoot();
+
+ JSEArchiveMetaData umd = new JSEArchiveMetaData();
+ umd.setContextRoot(contextRoot);
+ umd.setServletMappings(getServletMappings(jbossWebMetaData));
+ umd.setServletClassNames(getServletClassMap(jbossWebMetaData));
+ umd.setSecurityDomain(jbossWebMetaData.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(jbossWebMetaData));
+ umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
+
+ setConfigNameAndFile(umd, jbossWebMetaData);
+
+ return umd;
+ }
+
+ private void setConfigNameAndFile(JSEArchiveMetaData umd, JBossWebMetaData jbossWebMetaData)
+ {
+ String configName = null;
+ String configFile = null;
+
+ WebserviceDescriptionsMetaData wsDescriptions = jbossWebMetaData.getWebserviceDescriptions();
+ if (wsDescriptions != null && wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not supported");
+
+ if (wsDescriptions != null && wsDescriptions.size() > 0)
+ {
+ WebserviceDescriptionMetaData wsd = wsDescriptions.iterator().next();
+ configName = wsd.getConfigName();
+ configFile = wsd.getConfigFile();
+ }
+
+ List<ParamValueMetaData> contextParams = jbossWebMetaData.getContextParams();
+ if (contextParams != null)
+ {
+ for (ParamValueMetaData ctxParam : contextParams)
+ {
+ if (ctxParam.getParamName().equals("jbossws-config-name"))
+ configName = ctxParam.getParamValue();
+ if (ctxParam.getParamName().equals("jbossws-config-file"))
+ configFile = ctxParam.getParamValue();
+ }
+ }
+
+ umd.setConfigName(configName);
+ umd.setConfigFile(configFile);
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final JBossWebMetaData wmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ WebserviceDescriptionsMetaData wsdmd = wmd.getWebserviceDescriptions();
+ WebserviceDescriptionMetaData wsmd = wsdmd.get(name);
+ String location = null;
+ if (wsmd != null)
+ location = wsmd.getWsdlPublishLocation();
+ return location;
+ }
+ };
+ }
+
+ protected List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraints)
+ {
+ ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new ArrayList<JSESecurityMetaData>();
+ if (securityConstraints != null)
+ {
+ for (SecurityConstraintMetaData securityMetaData : securityConstraints)
+ {
+ JSESecurityMetaData current = new JSESecurityMetaData();
+ unifiedsecurityMetaData.add(current);
+
+ current.setTransportGuarantee(securityMetaData.getTransportGuarantee().name());
+
+ WebResourceCollectionsMetaData resources = securityMetaData.getResourceCollections();
+ for (WebResourceCollectionMetaData webResource : resources)
+ {
+ JSEResourceCollection currentResource = current.addWebResource(webResource.getName());
+ for (String currentPattern : webResource.getUrlPatterns())
+ {
+ currentResource.addPattern(currentPattern);
+ }
+ }
+ }
+ }
+ return unifiedsecurityMetaData;
+ }
+
+ private Map<String, String> getServletMappings(JBossWebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ List<ServletMappingMetaData> smappings = wmd.getServletMappings();
+ if (smappings != null)
+ {
+ for(ServletMappingMetaData mapping : smappings)
+ {
+ // FIXME - Add support for multiple mappings
+ mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
+ }
+ }
+ return mappings;
+ }
+
+ private Map<String, String> getServletClassMap(JBossWebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ JBossServletsMetaData servlets = wmd.getServlets();
+ if (servlets != null)
+ {
+ for (ServletMetaData servlet : servlets)
+ {
+ // Skip JSPs
+ if (servlet.getServletClass() == null || servlet.getServletClass().length() == 0)
+ continue;
+
+ mappings.put(servlet.getName(), servlet.getServletClass());
+ }
+ }
+ return mappings;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/JSEArchiveMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.tomcat;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ListenerMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.wsf.container.jboss50.WebAppDesciptorModifier;
+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.WSFRuntime;
+
+/**
+ * A deployer that modifies the web.xml meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep, WSFRuntime runtime)
+ {
+ String servletClass = (String)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CLASS);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " + WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CLASS);
+
+ modifyServletClass(dep, servletClass);
+
+ String listenerClass = (String)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
+ if (listenerClass != null)
+ modifyListener(dep, listenerClass);
+
+ Map<String, String> contextParams = (Map<String, String>)dep.getProperty(WebAppDesciptorModifier.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
+ if (contextParams != null)
+ modifyContextParams(dep, contextParams);
+ }
+
+ private void modifyServletClass(Deployment dep, String servletClass)
+ {
+ JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
+ if (webMetaData != null)
+ {
+ for (ServletMetaData servlet : webMetaData.getServlets())
+ {
+ String endpointClass = servlet.getServletClass();
+
+ // JSP
+ if (endpointClass == null || endpointClass.length() == 0)
+ {
+ log.debug("Ignore servlet class: " + endpointClass);
+ continue;
+ }
+
+ // Nothing to do if we have an <init-param>
+ if (!isAlreadyModified(servlet) && !isJavaxServlet(endpointClass, dep.getInitialClassLoader()))
+ {
+ servlet.setServletClass(servletClass);
+ ParamValueMetaData initParam = new ParamValueMetaData();
+ initParam.setParamName(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ initParam.setParamValue(endpointClass);
+ List<ParamValueMetaData> initParams = servlet.getInitParam();
+ if (initParams == null)
+ {
+ initParams = new ArrayList<ParamValueMetaData>();
+ servlet.setInitParam(initParams);
+ }
+ initParams.add(initParam);
+ }
+ }
+ }
+ }
+
+ private void modifyListener(Deployment dep, String listenerClass)
+ {
+ JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
+ if (webMetaData != null)
+ {
+ ListenerMetaData listener = new ListenerMetaData();
+ listener.setListenerClass(listenerClass);
+ List<ListenerMetaData> listeners = webMetaData.getListeners();
+ if (listeners == null)
+ {
+ listeners = new ArrayList<ListenerMetaData>();
+ webMetaData.setListeners(listeners);
+ }
+ listeners.add(listener);
+ }
+ }
+
+ private void modifyContextParams(Deployment dep, Map<String, String> newParams)
+ {
+ JBossWebMetaData webMetaData = dep.getAttachment(JBossWebMetaData.class);
+ if (webMetaData != null)
+ {
+ for (Map.Entry<String, String> entry : newParams.entrySet())
+ {
+ ParamValueMetaData ctxParam = new ParamValueMetaData();
+ ctxParam.setParamName(entry.getKey());
+ ctxParam.setParamValue(entry.getValue());
+ List<ParamValueMetaData> contextParams = webMetaData.getContextParams();
+ if (contextParams == null)
+ {
+ contextParams = new ArrayList<ParamValueMetaData>();
+ webMetaData.setContextParams(contextParams);
+ }
+ contextParams.add(ctxParam);
+ }
+ }
+ }
+
+ private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
+ {
+ boolean isServlet = false;
+ if (loader != null)
+ {
+ try
+ {
+ Class servletClass = loader.loadClass(orgServletClass);
+ isServlet = javax.servlet.Servlet.class.isAssignableFrom(servletClass);
+ if (isServlet == true)
+ {
+ log.info("Ignore servlet: " + orgServletClass);
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClass);
+ }
+ }
+ return isServlet;
+ }
+
+ private boolean isAlreadyModified(ServletMetaData servlet)
+ {
+ List<ParamValueMetaData> initParams = servlet.getInitParam();
+ if (initParams != null)
+ {
+ for (ParamValueMetaData param : initParams)
+ {
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(param.getParamName()))
+ return true;
+ }
+ }
+ return false;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/RewriteResults.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/RewriteResults.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/RewriteResults.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.tomcat;
+
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class RewriteResults
+{
+ // The URL to the rewritten web.xml
+ public URL webXML;
+ // Maps the servlet name to the target bean
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/RewriteResults.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB21.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.tomcat;
+
+//$Id$
+
+import org.dom4j.Element;
+import org.jboss.metadata.common.ejb.IAssemblyDescriptorMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+
+import java.util.Iterator;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB21 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ EJBArchiveMetaData ejbMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ if (ejbMetaData == null)
+ throw new IllegalStateException("Cannot obtain application meta data");
+
+ String securityDomain = ejbMetaData.getSecurityDomain();
+ if (securityDomain != null)
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+ JBossMetaData jbmd = dep.getAttachment(JBossMetaData.class);
+ IAssemblyDescriptorMetaData assemblyDescriptor = jbmd.getAssemblyDescriptor();
+ if (assemblyDescriptor != null)
+ {
+ SecurityRolesMetaData srmd = assemblyDescriptor.getSecurityRoles();
+ if (srmd != null)
+ {
+ Iterator it = srmd.keySet().iterator();
+ while (it.hasNext())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText((String)it.next());
+ }
+ }
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB3.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.tomcat;
+
+//$Id$
+
+import java.util.Iterator;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.dom4j.Element;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.SecurityHandler;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class SecurityHandlerEJB3 implements SecurityHandler
+{
+ public void addSecurityDomain(Element jbossWeb, Deployment dep)
+ {
+ String securityDomain = null;
+
+ Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ SecurityDomain anSecurityDomain = (SecurityDomain)container.resolveAnnotation(SecurityDomain.class);
+ if (anSecurityDomain != null)
+ {
+ if (securityDomain != null && !securityDomain.equals(anSecurityDomain.value()))
+ throw new IllegalStateException("Multiple security domains not supported");
+
+ securityDomain = anSecurityDomain.value();
+ }
+ }
+ }
+
+ if (securityDomain != null)
+ {
+ if (securityDomain.startsWith("java:/jaas/") == false)
+ securityDomain = "java:/jaas/" + securityDomain;
+
+ jbossWeb.addElement("security-domain").addText(securityDomain);
+ }
+ }
+
+ public void addSecurityRoles(Element webApp, Deployment dep)
+ {
+ Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+ if (anRolesAllowed != null)
+ {
+ for (String role : anRolesAllowed.value())
+ {
+ webApp.addElement("security-role").addElement("role-name").addText(role);
+ }
+ }
+ }
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/SecurityHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployment.tomcat;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+
+/**
+ * Modifies the web app according to the stack requirements.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public interface WebMetaDataModifier
+{
+ RewriteResults modifyMetaData(Deployment dep) throws ClassNotFoundException;
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/AbstractInvocationHandler.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/AbstractInvocationHandler.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/AbstractInvocationHandler.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractInvocationHandler extends InvocationHandler
+{
+ protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+ {
+ String methodName = seiMethod.getName();
+ Class[] paramTypes = seiMethod.getParameterTypes();
+ for (int i = 0; i < paramTypes.length; i++)
+ {
+ Class paramType = paramTypes[i];
+ if (JavaUtils.isPrimitive(paramType) == false)
+ {
+ String paramTypeName = paramType.getName();
+ paramType = JavaUtils.loadJavaType(paramTypeName);
+ paramTypes[i] = paramType;
+ }
+ }
+
+ Method implMethod = implClass.getMethod(methodName, paramTypes);
+ return implMethod;
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/AbstractInvocationHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB21.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,188 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.invocation.InvocationType;
+import org.jboss.invocation.PayloadKey;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.plugins.SecurityContextAssociation;
+import org.jboss.wsf.common.ObjectNameFactory;
+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.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB21 extends InvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
+
+ private String jndiName;
+ private MBeanServer server;
+ private ObjectName objectName;
+
+ InvocationHandlerEJB21()
+ {
+ }
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+ String ejbName = ep.getShortName();
+ Deployment dep = ep.getService().getDeployment();
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
+ if (beanMetaData == null)
+ throw new WebServiceException("Cannot obtain ejb meta data for: " + ejbName);
+
+ // get the bean's JNDI name
+ jndiName = beanMetaData.getContainerObjectNameJndiName();
+ if (jndiName == null)
+ throw new WebServiceException("Cannot obtain JNDI name for: " + ejbName);
+
+ server = MBeanServerLocator.locateJBoss();
+ objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+ if (server.isRegistered(objectName) == false)
+ throw new WebServiceException("Cannot find service endpoint target: " + objectName);
+
+ // Dynamically add the service endpoint interceptor
+ // http://jira.jboss.org/jira/browse/JBWS-758
+ try
+ {
+ EjbModule ejbModule = (EjbModule)server.getAttribute(objectName, "EjbModule");
+ StatelessSessionContainer container = (StatelessSessionContainer)ejbModule.getContainer(ejbName);
+
+ boolean injectionPointFound = false;
+ Interceptor prev = container.getInterceptor();
+ while (prev != null && prev.getNext() != null)
+ {
+ Interceptor next = prev.getNext();
+ if (next.getNext() == null)
+ {
+ log.debug("Inject service endpoint interceptor after: " + prev.getClass().getName());
+ ServiceEndpointInterceptor sepInterceptor = new ServiceEndpointInterceptor();
+ prev.setNext(sepInterceptor);
+ sepInterceptor.setNext(next);
+ injectionPointFound = true;
+ }
+ prev = next;
+ }
+ if (injectionPointFound == false)
+ log.warn("Cannot service endpoint interceptor injection point");
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot add service endpoint interceptor", ex);
+ }
+
+ }
+
+ public void invoke(Endpoint ep, Invocation inv) throws Exception
+ {
+ log.debug("Invoke: " + inv.getJavaMethod().getName());
+
+ // invoke on the container
+ try
+ {
+ // setup the invocation
+ org.jboss.invocation.Invocation jbInv = getMBeanInvocation(inv);
+
+ String[] sig = { org.jboss.invocation.Invocation.class.getName() };
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { jbInv }, sig);
+ inv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
+ {
+ // EJB2.1 endpoints will only get an JAXRPC context
+ MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
+ if (msgContext == null)
+ throw new IllegalStateException("Cannot obtain MessageContext");
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
+ SecurityContext sc = SecurityContextAssociation.getSecurityContext();
+ Principal principal = securityAdaptor.getPrincipal();
+ Object credential = securityAdaptor.getCredential();
+
+ if (principal == null && sc != null)
+ principal = sc.getUtil().getUserPrincipal();
+
+ if (credential == null && sc != null)
+ credential = sc.getUtil().getCredential();
+
+ Method method = inv.getJavaMethod();
+ Object[] args = inv.getArgs();
+ org.jboss.invocation.Invocation jbInv = new org.jboss.invocation.Invocation(null, method, args, null, principal, credential);
+
+ HandlerCallback callback = inv.getInvocationContext().getAttachment(HandlerCallback.class);
+ if (callback == null)
+ throw new IllegalStateException("Cannot obtain HandlerCallback");
+
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ jbInv.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext)msgContext).getMessage());
+ jbInv.setType(InvocationType.SERVICE_ENDPOINT);
+ jbInv.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+ jbInv.setValue(Invocation.class.getName(), inv, PayloadKey.TRANSIENT);
+
+ return jbInv;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB3.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.ejb.EJBContext;
+import javax.management.ObjectName;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.ejb3.BeanContext;
+import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.stateless.StatelessBeanContext;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.injection.lang.reflect.BeanProperty;
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+
+/**
+ * Handles invocations on EJB3 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB3 extends AbstractInvocationHandler
+{
+ private ObjectName objectName;
+
+ InvocationHandlerEJB3()
+ {
+ }
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+ String ejbName = ep.getShortName();
+ ArchiveDeployment dep = (ArchiveDeployment)ep.getService().getDeployment();
+ String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + dep.getSimpleName();
+ if (dep.getParent() != null)
+ {
+ nameStr += ",ear=" + dep.getParent().getSimpleName();
+ }
+
+ objectName = ObjectNameFactory.create(nameStr.toString());
+
+ Dispatcher dispatcher = Dispatcher.singleton;
+ if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
+ throw new WebServiceException("Cannot find service endpoint target: " + objectName);
+ }
+
+ public void invoke(Endpoint ep, Invocation wsInv) throws Exception
+ {
+ try
+ {
+ Dispatcher dispatcher = Dispatcher.singleton;
+ StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
+ Class beanClass = container.getBeanClass();
+
+ Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
+ Object[] args = wsInv.getArgs();
+
+ MethodInfo info = container.getMethodInfo(method);
+ EJBContainerInvocation<StatelessContainer, StatelessBeanContext> jbInv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+ jbInv.setAdvisor(container);
+ jbInv.setArguments(args);
+ jbInv.setContextCallback(new CallbackImpl(wsInv));
+
+ Object retObj = jbInv.invokeNext();
+
+ wsInv.setReturnValue(retObj);
+ }
+ catch (Throwable th)
+ {
+ handleInvocationException(th);
+ }
+ }
+
+ static class CallbackImpl implements BeanContextLifecycleCallback
+ {
+ private javax.xml.ws.handler.MessageContext jaxwsMessageContext;
+ private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
+
+ public CallbackImpl(Invocation epInv)
+ {
+ jaxrpcMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
+ jaxwsMessageContext = epInv.getInvocationContext().getAttachment(javax.xml.ws.handler.MessageContext.class);
+ }
+
+ public void attached(BeanContext beanCtx)
+ {
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+ sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ {
+ EJBContext ejbCtx = beanCtx.getEJBContext();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ExtensibleWebServiceContext wsContext = spiProvider.getSPI(WebServiceContextFactory.class).newWebServiceContext(InvocationType.JAXWS_EJB3, jaxwsMessageContext);
+ wsContext.addAttachment(EJBContext.class, ejbCtx);
+ beanProp.set(beanCtx.getInstance(), wsContext);
+ }
+ }
+
+ public void released(BeanContext beanCtx)
+ {
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+ sbc.setMessageContextJAXRPC(null);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ beanProp.set(beanCtx.getInstance(), null);
+ }
+ }
+}
\ No newline at end of file
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerFactoryImpl.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+import org.jboss.wsf.spi.invocation.*;
+
+/**
+ * The default invocation model factory fro AS 5.0.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 19, 2007
+ */
+public class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
+{
+ public InvocationHandler newInvocationHandler(InvocationType type)
+ {
+ InvocationHandler handler = null;
+
+ switch(type)
+ {
+ case JAXRPC_JSE:
+ handler = new InvocationHandlerJAXRPC();
+ break;
+ case JAXRPC_EJB21:
+ handler = new InvocationHandlerEJB21();
+ break;
+ case JAXRPC_MDB21:
+ handler = new InvocationHandlerMDB21();
+ break;
+ case JAXWS_JSE:
+ handler = new InvocationHandlerJAXWS();
+ break;
+ case JAXWS_EJB3:
+ handler = new InvocationHandlerEJB3();
+ break;
+ case JAXWS_MDB3:
+ handler = new InvocationHandlerMDB3();
+ break;
+ }
+
+ if(null == handler)
+ throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " +type);
+
+ return handler;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXRPC.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXRPC.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXRPC.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerJAXRPC extends InvocationHandlerJSE
+{
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ try
+ {
+ Object targetBean = getTargetBean(ep, epInv);
+
+ InvocationContext invContext = epInv.getInvocationContext();
+ if (targetBean instanceof ServiceLifecycle)
+ {
+ ServletEndpointContext sepContext = invContext.getAttachment(ServletEndpointContext.class);
+ if (sepContext != null)
+ ((ServiceLifecycle)targetBean).init(sepContext);
+ }
+
+ try
+ {
+ super.invoke(ep, epInv);
+ }
+ finally
+ {
+ if (targetBean instanceof ServiceLifecycle)
+ {
+ ((ServiceLifecycle)targetBean).destroy();
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXRPC.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXWS.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXWS.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXWS.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerJAXWS extends InvocationHandlerJSE
+{
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJAXWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.wsf.common.JavaUtils;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.ResourceInjector;
+import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
+
+/**
+ * Handles invocations on JSE endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerJSE extends InvocationHandler
+{
+ private SPIProvider spiProvider;
+ private ResourceInjectorFactory resourceInjectorFactory;
+
+ public InvocationHandlerJSE()
+ {
+ spiProvider = SPIProviderResolver.getInstance().getProvider();
+ resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
+ }
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+ }
+
+ protected Object getTargetBean(Endpoint ep, Invocation epInv)
+ {
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot get target bean instance", ex);
+ }
+ }
+ return targetBean;
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ try
+ {
+ Object targetBean = getTargetBean(ep, epInv);
+
+ InvocationContext invContext = epInv.getInvocationContext();
+ WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
+ if (wsContext != null)
+ {
+ ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
+ injector.inject(targetBean, wsContext);
+ }
+
+ Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
+ Object retObj = method.invoke(targetBean, epInv.getArgs());
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ protected Method getImplMethod(Class implClass, Method seiMethod) throws ClassNotFoundException, NoSuchMethodException
+ {
+ String methodName = seiMethod.getName();
+ Class[] paramTypes = seiMethod.getParameterTypes();
+ for (int i = 0; i < paramTypes.length; i++)
+ {
+ Class paramType = paramTypes[i];
+ if (JavaUtils.isPrimitive(paramType) == false)
+ {
+ String paramTypeName = paramType.getName();
+ paramType = JavaUtils.loadJavaType(paramTypeName);
+ paramTypes[i] = paramType;
+ }
+ }
+
+ Method implMethod = implClass.getMethod(methodName, paramTypes);
+ return implMethod;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB21.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB21.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB21.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+/**
+ * Handles invocations on MDB EJB21 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerMDB21 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerMDB21.class);
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ log.debug("Invoke: " + epInv.getJavaMethod().getName());
+
+ try
+ {
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance", ex);
+ }
+ }
+ Class implClass = targetBean.getClass();
+ Method seiMethod = epInv.getJavaMethod();
+ Method implMethod = getImplMethod(implClass, seiMethod);
+
+ Object[] args = epInv.getArgs();
+ Object retObj = implMethod.invoke(targetBean, args);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB3.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB3.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB3.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+/**
+ * Handles invocations on MDB EJB3 endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerMDB3 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerMDB3.class);
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ log.debug("Invoke: " + epInv.getJavaMethod().getName());
+
+ try
+ {
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance", ex);
+ }
+ }
+ Class implClass = targetBean.getClass();
+ Method seiMethod = epInv.getJavaMethod();
+ Method implMethod = getImplMethod(implClass, seiMethod);
+
+ Object[] args = epInv.getArgs();
+ Object retObj = implMethod.invoke(targetBean, args);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/InvocationHandlerMDB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdapterFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdapterFactoryImpl.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdapterFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 24, 2007
+ */
+public class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
+{
+ public SecurityAdaptor newSecurityAdapter()
+ {
+ return new SecurityAdaptorImpl();
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdapterFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdaptorImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdaptorImpl.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdaptorImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+
+import java.security.Principal;
+
+/**
+ * A JBoss specific SecurityAssociationAdaptor
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class SecurityAdaptorImpl implements SecurityAdaptor
+{
+ SecurityAdaptorImpl()
+ {
+ }
+
+ public Principal getPrincipal()
+ {
+ return SecurityAssociation.getPrincipal();
+ }
+
+ public void setPrincipal(Principal pricipal)
+ {
+ SecurityAssociation.setPrincipal(pricipal);
+ }
+
+ public Object getCredential()
+ {
+ return SecurityAssociation.getCredential();
+ }
+
+ public void setCredential(Object credential)
+ {
+ SecurityAssociation.setCredential(credential);
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/SecurityAdaptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/ServiceEndpointInterceptor.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/ServiceEndpointInterceptor.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/ServiceEndpointInterceptor.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+// $Id$
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+
+/**
+ * This Interceptor does the ws4ee handler processing.
+ *
+ * According to the ws4ee spec the handler logic must be invoked after the container
+ * applied method level security to the invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Sep-2005
+ */
+public class ServiceEndpointInterceptor extends AbstractInterceptor
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceEndpointInterceptor.class);
+
+ // Interceptor implementation --------------------------------------
+
+ /** Before and after we call the service endpoint bean, we process the handler chains.
+ */
+ public Object invoke(final org.jboss.invocation.Invocation jbInv) throws Exception
+ {
+ // If no msgContext, it's not for us
+ SOAPMessageContext msgContext = (SOAPMessageContext)jbInv.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ if (msgContext == null)
+ {
+ return getNext().invoke(jbInv);
+ }
+
+ // Get the endpoint invocation
+ Invocation wsInv = (Invocation)jbInv.getValue(Invocation.class.getName());
+
+ // Get the handler callback
+ HandlerCallback callback = (HandlerCallback)jbInv.getValue(HandlerCallback.class.getName());
+
+ // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+ if (callback != null && wsInv != null)
+ {
+ try
+ {
+ // call the request handlers
+ boolean handlersPass = callback.callRequestHandlerChain(wsInv, HandlerType.ENDPOINT);
+ handlersPass = handlersPass && callback.callRequestHandlerChain(wsInv, HandlerType.POST);
+
+ // Call the next interceptor in the chain
+ if (handlersPass)
+ {
+ // The SOAPContentElements stored in the EndpointInvocation might have changed after
+ // handler processing. Get the updated request payload. This should be a noop if request
+ // handlers did not modify the incomming SOAP message.
+ Object[] reqParams = wsInv.getArgs();
+ jbInv.setArguments(reqParams);
+ Object resObj = getNext().invoke(jbInv);
+
+ // Setting the message to null should trigger binding of the response message
+ msgContext.setMessage(null);
+ wsInv.setReturnValue(resObj);
+ }
+
+ // call the response handlers
+ handlersPass = callback.callResponseHandlerChain(wsInv, HandlerType.POST);
+ handlersPass = handlersPass && callback.callResponseHandlerChain(wsInv, HandlerType.ENDPOINT);
+
+ // update the return value after response handler processing
+ Object resObj = wsInv.getReturnValue();
+
+ return resObj;
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ // call the fault handlers
+ boolean handlersPass = callback.callFaultHandlerChain(wsInv, HandlerType.POST, ex);
+ handlersPass = handlersPass && callback.callFaultHandlerChain(wsInv, HandlerType.ENDPOINT, ex);
+ }
+ catch (Exception subEx)
+ {
+ log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+ }
+ throw ex;
+ }
+ finally
+ {
+ // do nothing
+ }
+ }
+ else
+ {
+ log.warn("Handler callback not available");
+ return getNext().invoke(jbInv);
+ }
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/ServiceEndpointInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java 2008-05-16 11:57:45 UTC (rev 7058)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.invocation;
+
+import org.jboss.wsf.spi.invocation.*;
+
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jul 25, 2007
+ */
+public class WebServiceContextFactoryImpl extends WebServiceContextFactory
+{
+ public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
+ {
+ ExtensibleWebServiceContext context = null;
+
+ if(type.toString().indexOf("EJB")!=-1 || type.toString().indexOf("MDB")!=-1)
+ context = new WebServiceContextEJB(messageContext);
+ else
+ context = new WebServiceContextJSE(messageContext);
+
+ return context;
+ }
+}
Property changes on: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/invocation/WebServiceContextFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 8 months
JBossWS SVN: r7057 - in container/jboss50/branches/jbossws-jboss500/src/main/resources: jbossws-jboss50.deployer/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 06:41:38 -0400 (Fri, 16 May 2008)
New Revision: 7057
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Log:
fix formatting
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-16 10:39:20 UTC (rev 7056)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-16 10:41:38 UTC (rev 7057)
@@ -5,201 +5,200 @@
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>
+ <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>
+ <!-- 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.DeploymentAspectHttpServer"/>
+ <!-- The HTTPServer used by the JAXWS Endpoint API -->
+ <bean name="WSHTTPServer" class="org.jboss.wsf.container.jboss50.DeploymentAspectHttpServer"/>
- <!-- The registry for web service endpoints -->
- <bean name="WSEndpointRegistry" class="org.jboss.wsf.framework.management.ManagedEndpointRegistry">
- <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
- </bean>
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry" class="org.jboss.wsf.framework.management.ManagedEndpointRegistry">
+ <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
+ </bean>
- <!-- *********************************************************************************************************************
- Main WSFRuntimes.
- -->
+ <!-- *********************************************************************************************************************
+ Main WSFRuntimes.
+ -->
- <bean name="WebserviceJSERuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
- </bean>
+ <bean name="WebserviceJSERuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
+ <property name="runtimeName">WebserviceJSERuntime</property>
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+ </bean>
- <bean name="WebserviceEJBRuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
- <property name="runtimeName">WebserviceEJBRuntime</property>
- <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
- </bean>
+ <bean name="WebserviceEJBRuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
+ <property name="runtimeName">WebserviceEJBRuntime</property>
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
+ </bean>
- <bean name="EndpointAPIRuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
- <property name="runtimeName">EndpointAPIRuntime</property>
- <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEndpointAPI"/></property>
- </bean>
+ <bean name="EndpointAPIRuntime" class="org.jboss.wsf.container.jboss50.BareWSFRuntime">
+ <property name="runtimeName">EndpointAPIRuntime</property>
+ <property name="deploymentAspectManager"><inject bean="WSDeploymentAspectManagerEndpointAPI"/></property>
+ </bean>
- <!--
- *********************************************************************************************************************
- Deployment aspect manager
- -->
+ <!--
+ *********************************************************************************************************************
+ Deployment aspect manager
+ -->
- <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
- <property name="name">WSDeploymentAspectManagerJSE</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>
+ <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="name">WSDeploymentAspectManagerJSE</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.ContainerMetaDataDeploymentAspect">
- <property name="provides">ContainerMetaData, VFSRoot</property>
- </bean>
+ <!--
+ The container deployment aspects
+ -->
+ <bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.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="WSContextRootDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContextRoot</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="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="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="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="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="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="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="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.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContextProperties, StackDescriptor</property>
- </bean>
+ <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
+ <property name="requires">ContextProperties, StackDescriptor</property>
+ </bean>
- <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss50.RuntimeLoaderDeploymentAspect">
- <property name="requires">ContainerMetaData</property>
- <property name="provides">RuntimeLoader</property>
- </bean>
+ <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss50.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="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.WebAppDeploymentAspect">
- <property name="requires">WebMetaData, ContextProperties</property>
- <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
- <property name="mainDeployer"><inject bean="MainDeployer"/></property>
- </bean>
+ <bean name="WSWebAppDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebAppDeploymentAspect">
+ <property name="requires">WebMetaData, ContextProperties</property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ </bean>
- <bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebApp50GeneratorDeploymentAspect">
- <property name="requires">URLPattern</property>
- <property name="provides">WebMetaData</property>
- <property name="securityHandlerEJB21"><inject bean="WSSecurityHandlerEJB21"/></property>
- <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
- </bean>
+ <bean name="WSWebAppGeneratorDeploymentAspect" class="org.jboss.wsf.container.jboss50.WebApp50GeneratorDeploymentAspect">
+ <property name="requires">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.SecurityHandlerEJB21"/>
- <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss50.DefaultWebAppDesciptorModifierImpl"/>
- <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss50.WebXMLRewriterImpl">
- <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
- </bean>
+ <!-- Deployment aspect helper beans -->
+ <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.container.jboss50.DefaultWebAppDesciptorModifierImpl"/>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.container.jboss50.WebXMLRewriterImpl">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
+ </bean>
- <!-- Deployment aspect installers -->
+ <!-- Deployment aspect installers -->
- <!-- Phase 1 -->
- <bean name="WSDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
- <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></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"/>
+ <!-- Phase 1 -->
+ <bean name="WSDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></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"/>
- <!-- Phase2 -->
- <inject bean="WSEndpointLifecycleDeploymentAspect"/>
- <inject bean="WSRuntimeLoaderDeploymentAspect"/>
- </set>
- </property>
- </bean>
+ <!-- Phase2 -->
+ <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="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="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="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="WSEndpointAPIDeploymentAspect"/>
- <inject bean="WSEndpointAddressDeploymentAspect"/>
- <inject bean="WSEndpointHandlerDeploymentAspect"/>
- <inject bean="WSEndpointLifecycleDeploymentAspect"/>
- <inject bean="WSEndpointMetricsDeploymentAspect"/>
- <inject bean="WSEndpointNameDeploymentAspect"/>
- <inject bean="WSEndpointRegistryDeploymentAspect"/>
- <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="WSEndpointAPIDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSWebAppDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
-
-</deployment>
\ No newline at end of file
+</deployment>
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 10:39:20 UTC (rev 7056)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 10:41:38 UTC (rev 7057)
@@ -3,48 +3,48 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!--
- *********************************************************************************************************************
- Web Service deployment
+ *********************************************************************************************************************
+ Web Service deployment
- There are two deployers registered with the JBoss Main Deployer.
- The order of which is important
+ There are two deployers registered with the JBoss Main Deployer.
+ The order of which is important
- 1) EJBDeployer < WebServiceDeployerEJB
- 2) WebServiceDeployerPreJSE < WarDeployer
- 3) WarDeployer < WebServiceDeployerPostJSE
+ 1) EJBDeployer < WebServiceDeployerEJB
+ 2) WebServiceDeployerPreJSE < WarDeployer
+ 3) WarDeployer < WebServiceDeployerPostJSE
- Each WebServiceDeployer has a number of DeployerHooks registered with it
+ Each WebServiceDeployer has a number of DeployerHooks registered with it
- - WebServiceDeployerEJB
- - WSDeployerHook_JAXRPC_EJB21
- - WSDeployerHook_JAXWS_EJB3
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
- - WebServiceDeployerPreJSE
- - WSDeployerHook_JAXRPC_JSE
- - WSDeployerHook_JAXWS_JSE
+ - WebServiceDeployerPreJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
- Conceptually, each of these hooks implements the following pattern:
+ Conceptually, each of these hooks implements the following pattern:
- DeployerHook.deploy(unit)
- if(isWebServiceDeployment)
+ DeployerHook.deploy(unit)
+ if(isWebServiceDeployment)
Deployment dep = createDeployment(unit)
DeploymentAspectManager.deploy(dep)
- DeployerHook.undeploy(unit)
- Deployment dep = getDeployment(unit)
- DeploymentAspectManager.undeploy(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.
+ 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.
+ Finally, each Endpoint is registered with the EndpointRegistry.
- *********************************************************************************************************************
+ *********************************************************************************************************************
-->
<!--
- A web service deployer that hooks in after the EJB deployers
+ A web service deployer that hooks in after the EJB deployers
-->
<bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
<property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
@@ -54,7 +54,7 @@
</bean>
<!--
- A web service deployer that hooks in before the WAR deployer
+ A web service deployer that hooks in before the WAR deployer
-->
<bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPreJSE">
<property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
@@ -62,8 +62,8 @@
</bean>
<!--
- A web service deployer that hooks in after the WAR deployer
- This deployer depends on the RuntimeClassloader being available.
+ A web service deployer that hooks in after the WAR deployer
+ This deployer depends on the RuntimeClassloader being available.
-->
<bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPostJSE">
<property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
@@ -71,7 +71,7 @@
</bean>
<!--
- Register DeployerHooks with JBoss deployers
+ Register DeployerHooks with JBoss deployers
-->
<!-- Phase 1 of JSE JAX-RPC -->
16 years, 8 months
JBossWS SVN: r7056 - in container/jboss50/branches/jbossws-jboss501/src/main/resources: jbossws-jboss50.deployer/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 06:39:20 -0400 (Fri, 16 May 2008)
New Revision: 7056
Modified:
container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
Log:
fix formating
Modified: container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-16 08:17:36 UTC (rev 7055)
+++ container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-16 10:39:20 UTC (rev 7056)
@@ -252,4 +252,4 @@
</property>
</bean>
-</deployment>
\ No newline at end of file
+</deployment>
Modified: container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 08:17:36 UTC (rev 7055)
+++ container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2008-05-16 10:39:20 UTC (rev 7056)
@@ -5,39 +5,39 @@
xmlns="urn:jboss:bean-deployer:2.0">
<!-- *********************************************************************************************************************
- Web Service deployment
+ Web Service deployment
- There are two deployers registered with the JBoss Main Deployer.
- The order of which is important
+ 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
+ 1) EJBDeployer < WebServiceDeployerEJB < WarDeployer
+ 2) WebServiceDeployerPreJSE < WarDeployer
+ 3) WarDeployer < WebServiceDeployerPostJSE
- Each WebServiceDeployer has a number of DeployerHooks registered with it
+ Each WebServiceDeployer has a number of DeployerHooks registered with it
- - WebServiceDeployerEJB
- - WSDeployerHook_JAXRPC_EJB21
- - WSDeployerHook_JAXWS_EJB3
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
- - WebServiceDeployerPreJSE
- - WSDeployerHook_JAXRPC_JSE
- - WSDeployerHook_JAXWS_JSE
+ - WebServiceDeployerPreJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
- Conceptually, each of these hooks implements the following pattern:
+ Conceptually, each of these hooks implements the following pattern:
- DeployerHook.deploy(unit)
- if(isWebServiceDeployment)
- Deployment dep = createDeployment(unit)
- DeploymentAspectManager.deploy(dep)
+ DeployerHook.deploy(unit)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeploymentAspectManager.deploy(dep)
- DeployerHook.undeploy(unit)
- Deployment dep = getDeployment(unit)
- WSFRuntime.start(dep)
+ DeployerHook.undeploy(unit)
+ Deployment dep = getDeployment(unit)
+ WSFRuntime.start(dep)
- Each deployer hook has a web service WSFRuntime injected into it.
+ Each deployer hook has a web service WSFRuntime injected into it.
- ********************************************************************************************************************* -->
+ ********************************************************************************************************************* -->
<!--
A web service deployer that hooks in after the EJB deployers
@@ -158,4 +158,4 @@
<depends>WebServiceDeployerEJB</depends>
</bean>
-</deployment>
\ No newline at end of file
+</deployment>
16 years, 8 months
JBossWS SVN: r7055 - stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 04:17:36 -0400 (Fri, 16 May 2008)
New Revision: 7055
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java
Log:
cleanup on tear down - we're running multiple tests in the same JVM
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java 2008-05-16 08:16:52 UTC (rev 7054)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java 2008-05-16 08:17:36 UTC (rev 7055)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1762;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -40,24 +39,32 @@
*/
public abstract class AbstractEJB2Test extends JBossWSTest
{
+
private EJB2Iface ejb2Proxy;
- public void setUp() throws Exception
+ @Override
+ protected void setUp() throws Exception
{
- super.setUp();
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
URL mappingURL = getResourceURL("jaxrpc/jbws1762/META-INF/jaxrpc-mapping.xml");
QName serviceName = new QName("http://org.jboss.test.webservice/jbws1762", "EJB2Bean");
ServiceFactoryImpl factory = new ServiceFactoryImpl();
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL);
- ejb2Proxy = (EJB2Iface)service.getPort(EJB2Iface.class);
+ this.ejb2Proxy = (EJB2Iface)service.getPort(EJB2Iface.class);
}
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.ejb2Proxy = null;
+ }
+
protected abstract String getWSDLLocation();
public void testEJB2() throws Exception
{
- assertEquals(ejb2Proxy.echo("Hello!"), "Hello!");
+ assertEquals(this.ejb2Proxy.echo("Hello!"), "Hello!");
}
+
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java 2008-05-16 08:16:52 UTC (rev 7054)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java 2008-05-16 08:17:36 UTC (rev 7055)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1762;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -41,30 +40,32 @@
*/
public abstract class AbstractPOJOTest extends JBossWSTest
{
- private String pojoTargetNS = "http://org.jboss.test.ws/jbws1762";
- private String pojoServiceName = "POJOBean";
+
private POJOIface pojoProxy;
- public void setUp() throws Exception
+ @Override
+ protected void setUp() throws Exception
{
- super.setUp();
-
- if (pojoProxy == null)
- {
- ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
- URL mappingURL = getResourceURL("jaxrpc/jbws1762/WEB-INF/jaxrpc-mapping.xml");
- QName serviceName = new QName(pojoTargetNS, pojoServiceName);
-
- Service service = factory.createService(wsdlURL, serviceName, mappingURL);
- pojoProxy = (POJOIface)service.getPort(POJOIface.class);
- }
+ ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
+ URL mappingURL = getResourceURL("jaxrpc/jbws1762/WEB-INF/jaxrpc-mapping.xml");
+ QName serviceName = new QName("http://org.jboss.test.ws/jbws1762", "POJOBean");
+
+ Service service = factory.createService(wsdlURL, serviceName, mappingURL);
+ this.pojoProxy = (POJOIface)service.getPort(POJOIface.class);
}
- protected abstract String getWSDLLocation();
-
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.pojoProxy = null;
+ }
+
public void testPOJO() throws Exception
{
- assertEquals(pojoProxy.echo("Hello!"), "Hello!");
+ assertEquals(this.pojoProxy.echo("Hello!"), "Hello!");
}
+
+ protected abstract String getWSDLLocation();
+
}
16 years, 8 months
JBossWS SVN: r7054 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 04:16:52 -0400 (Fri, 16 May 2008)
New Revision: 7054
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java
Log:
cleanup on tear down - we're running multiple tests in the same JVM
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java 2008-05-16 06:55:36 UTC (rev 7053)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java 2008-05-16 08:16:52 UTC (rev 7054)
@@ -38,29 +38,30 @@
*/
public abstract class AbstractEJB3Test extends JBossWSTest
{
- private String ejb3TargetNS = "http://services.jbws1762.jaxws.ws.test.jboss.org/";
- private String ejb3ServiceName = "JBWS1762EJB3Service";
- private static EJB3Iface ejb3Proxy;
+ private EJB3Iface ejb3Proxy;
+
@Override
- public void setUp() throws Exception
+ protected void setUp() throws Exception
{
- super.setUp();
+ QName serviceName = new QName("http://services.jbws1762.jaxws.ws.test.jboss.org/", "JBWS1762EJB3Service");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
- if (ejb3Proxy == null)
- {
- QName serviceName = new QName(ejb3TargetNS, ejb3ServiceName);
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
-
- Service service = Service.create(wsdlURL, serviceName);
- ejb3Proxy = service.getPort(EJB3Iface.class);
- }
+ Service service = Service.create(wsdlURL, serviceName);
+ this.ejb3Proxy = service.getPort(EJB3Iface.class);
}
- protected abstract String getWSDLLocation();
-
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.ejb3Proxy = null;
+ }
+
public void testEJB3() throws Exception
{
- assertEquals(ejb3Proxy.echo("Hello!"), "Hello!");
+ assertEquals(this.ejb3Proxy.echo("Hello!"), "Hello!");
}
+
+ protected abstract String getWSDLLocation();
+
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java 2008-05-16 06:55:36 UTC (rev 7053)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java 2008-05-16 08:16:52 UTC (rev 7054)
@@ -38,29 +38,30 @@
*/
public abstract class AbstractPOJOTest extends JBossWSTest
{
- private String pojoTargetNS = "http://services.jbws1762.jaxws.ws.test.jboss.org/";
- private String pojoServiceName = "JBWS1762POJOService";
+
private POJOIface pojoProxy;
@Override
protected void setUp() throws Exception
{
- super.setUp();
+ QName serviceName = new QName("http://services.jbws1762.jaxws.ws.test.jboss.org/", "JBWS1762POJOService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
- if (pojoProxy == null)
- {
- QName serviceName = new QName(pojoTargetNS, pojoServiceName);
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" + getWSDLLocation());
-
- Service service = Service.create(wsdlURL, serviceName);
- pojoProxy = (POJOIface)service.getPort(POJOIface.class);
- }
+ Service service = Service.create(wsdlURL, serviceName);
+ this.pojoProxy = (POJOIface)service.getPort(POJOIface.class);
}
- protected abstract String getWSDLLocation();
-
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.pojoProxy = null;
+ }
+
public void testPOJO() throws Exception
{
assertEquals(pojoProxy.echo("Hello!"), "Hello!");
}
+
+ protected abstract String getWSDLLocation();
+
}
16 years, 8 months
JBossWS SVN: r7053 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 02:55:36 -0400 (Fri, 16 May 2008)
New Revision: 7053
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
fix jbws1762 tests
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2008-05-16 06:51:33 UTC (rev 7052)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2008-05-16 06:55:36 UTC (rev 7053)
@@ -20,6 +20,7 @@
<surefire.jvm.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy</surefire.jvm.args>
<hibernate.version>3.2.4.sp1</hibernate.version>
<asm.version>2.2.3</asm.version>
+ <endpoint.servlet>org.jboss.wsf.stack.cxf.EndpointServlet</endpoint.servlet>
</properties>
<!-- Modules -->
16 years, 8 months
JBossWS SVN: r7052 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-16 02:51:33 -0400 (Fri, 16 May 2008)
New Revision: 7052
Modified:
stack/metro/trunk/modules/testsuite/pom.xml
Log:
fix jbws1762 tests
Modified: stack/metro/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/metro/trunk/modules/testsuite/pom.xml 2008-05-16 06:49:39 UTC (rev 7051)
+++ stack/metro/trunk/modules/testsuite/pom.xml 2008-05-16 06:51:33 UTC (rev 7052)
@@ -19,6 +19,7 @@
<surefire.jdpw.args>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</surefire.jdpw.args>
<surefire.jvm.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy</surefire.jvm.args>
<hibernate.version>3.2.4.sp1</hibernate.version>
+ <endpoint.servlet>org.jboss.wsf.stack.metro.EndpointServlet</endpoint.servlet>
</properties>
<!-- Modules -->
16 years, 8 months