Author: thomas.diesler(a)jboss.com
Date: 2007-07-11 17:51:39 -0400 (Wed, 11 Jul 2007)
New Revision: 3853
Removed:
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
Log:
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeploymentAspect.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -40,16 +40,14 @@
*/
public class ModifyWebMetaDataDeploymentAspect extends DeploymentAspect
{
- private String servletClass;
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
@Override
public void create(Deployment dep)
{
+ String propKey = "SERVICE_ENDPOINT_SERVLET";
+ String servletClass = (String)dep.getContext().getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " +
propKey);
+
WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
if (webMetaData != null)
{
Modified:
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeploymentAspect.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -69,22 +69,25 @@
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployement
info");
- URL warURL = udi.webappURL;
-
- log.debug("publishServiceEndpoint: " + warURL);
- try
+ if (dep.getType().toString().endsWith("EJB21") ||
dep.getType().toString().endsWith("EJB3"))
{
- webXMLRewriter.rewriteWebXml(dep);
- org.jboss.deployers.client.spi.Deployment deployment =
createDeploymentContext(warURL);
+ URL warURL = udi.webappURL;
- mainDeployer.deploy(deployment);
+ log.debug("publishServiceEndpoint: " + warURL);
+ try
+ {
+ webXMLRewriter.rewriteWebXml(dep);
+ org.jboss.deployers.client.spi.Deployment deployment =
createDeploymentContext(warURL);
- deploymentMap.put(warURL.toExternalForm(), deployment);
+ mainDeployer.deploy(deployment);
+
+ deploymentMap.put(warURL.toExternalForm(), deployment);
+ }
+ catch (Exception ex)
+ {
+ WSDeploymentException.rethrow(ex);
+ }
}
- catch (Exception ex)
- {
- WSDeploymentException.rethrow(ex);
- }
}
public void destroy(Deployment dep)
Deleted:
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeploymentAspect.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.stack.jbws;
-
-//$Id: UnifiedMetaDataAssociationDeployer.java 3772 2007-07-01 19:29:13Z
thomas.diesler(a)jboss.com $
-
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-
-/**
- * A deployer that assigns the EndpointMetaData to the Endpoint
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedMetaDataAssociationDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep)
- {
- UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
- if (umd == null)
- throw new IllegalStateException("Cannot obtain unified meta data");
-
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ServerEndpointMetaData sepMetaData =
ep.getAttachment(ServerEndpointMetaData.class);
- if (sepMetaData == null)
- {
- sepMetaData = getEndpointMetaData(umd, ep);
- sepMetaData.setEndpoint(ep);
-
- ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
-
- String targetBean = ep.getTargetBeanName();
- if (targetBean != null)
- sepMetaData.setServiceEndpointImplName(targetBean);
- }
- }
- }
-
- private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
- {
- String epName = ep.getShortName();
-
- ServerEndpointMetaData epMetaData = null;
- for (ServiceMetaData serviceMetaData : umd.getServices())
- {
- for (EndpointMetaData aux : serviceMetaData.getEndpoints())
- {
- String linkName = ((ServerEndpointMetaData)aux).getLinkName();
- if (epName.equals(linkName))
- {
- epMetaData = (ServerEndpointMetaData)aux;
- break;
- }
- }
- }
-
- if (epMetaData == null)
- throw new IllegalStateException("Cannot find endpoint meta data for: "
+ epName);
-
- return epMetaData;
- }
-}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -26,9 +26,13 @@
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.JAXRPCDeployment;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
@@ -78,5 +82,45 @@
dep.getContext().addAttachment(UnifiedMetaData.class, umd);
}
+
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ ServerEndpointMetaData sepMetaData =
ep.getAttachment(ServerEndpointMetaData.class);
+ if (sepMetaData == null)
+ {
+ sepMetaData = getEndpointMetaData(umd, ep);
+ sepMetaData.setEndpoint(ep);
+
+ ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
+
+ String targetBean = ep.getTargetBeanName();
+ if (targetBean != null)
+ sepMetaData.setServiceEndpointImplName(targetBean);
+ }
+ }
}
+
+ private ServerEndpointMetaData getEndpointMetaData(UnifiedMetaData umd, Endpoint ep)
+ {
+ String epName = ep.getShortName();
+
+ ServerEndpointMetaData epMetaData = null;
+ for (ServiceMetaData serviceMetaData : umd.getServices())
+ {
+ for (EndpointMetaData aux : serviceMetaData.getEndpoints())
+ {
+ String linkName = ((ServerEndpointMetaData)aux).getLinkName();
+ if (epName.equals(linkName))
+ {
+ epMetaData = (ServerEndpointMetaData)aux;
+ break;
+ }
+ }
+ }
+
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot find endpoint meta data for: "
+ epName);
+
+ return epMetaData;
+ }
}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-11
21:51:39 UTC (rev 3853)
@@ -171,7 +171,8 @@
The container deployment aspects
-->
<bean name="WSClassLoaderInjectionDeploymentAspect"
class="org.jboss.wsf.container.jboss50.ClassLoaderInjectionDeploymentAspect">
- <property name="provides">AssociatedClassLoader</property>
+ <property name="requires">AllowClassLoaderInjection</property>
+ <property name="provides">ContainerClassLoader</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -180,18 +181,13 @@
</bean>
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleContextRootDeploymentAspect">
- <property name="provides">ContextRoot</property>
<property name="requires">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
+ <property name="provides">ContextRoot</property>
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
@@ -211,7 +207,7 @@
</bean>
<bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeploymentAspect">
- <property
name="requires">RegisteredEndpoint,PublishedContract</property>
+ <property name="requires">LAST_DEPLOYMENT_ASPECT</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -229,6 +225,7 @@
</bean>
<bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointNameDeploymentAspect">
+ <property name="requires">URLPattern</property>
<property name="provides">EndpointName</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
@@ -238,8 +235,8 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.spi.deployment.EndpointRegistryDeploymentAspect">
- <property name="provides">RegisteredEndpoint</property>
<property
name="requires">EndpointName,StackEndpointHandler,InitializedMetaDataModel</property>
+ <property name="provides">RegisteredEndpoint</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -248,8 +245,7 @@
</bean>
<bean name="WSModifyWebMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
- <property name="requires">ContainerMetaData</property>
- <property name="servletClass"><inject
bean="WSWebAppDesciptorModifier"
property="servletClass"/></property>
+ <property name="requires">ContextProperties</property>
<install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -259,38 +255,28 @@
<bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
<property name="provides">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.spi.deployment.BackwardCompatibleURLPatternDeploymentAspect">
- <property name="provides">URLPattern</property>
<property name="requires">ContextRoot,
ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
+ <property name="provides">URLPattern</property>
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
<bean name="WSWebAppDeploymentAspect"
class="org.jboss.wsf.container.jboss50.WebAppDeploymentAspect">
- <property name="requires">WebMetaData</property>
+ <property name="requires">WebMetaData,
ContextProperties</property>
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject
bean="MainDeployer"/></property>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
@@ -298,24 +284,22 @@
</bean>
<bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeploymentAspect">
- <property name="provides">WebMetaData</property>
<property name="requires">URLPattern</property>
+ <property name="provides">WebMetaData</property>
<property name="securityHandlerEJB21"><inject
bean="WSSecurityHandlerEJB21"/></property>
<property name="securityHandlerEJB3"><inject
bean="WSSecurityHandlerEJB3"/></property>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
</bean>
- <!-- Deployer helper beans -->
+ <!-- Deployment aspect helper beans -->
<bean name="WSEndpointMetrics"
class="org.jboss.wsf.spi.management.BasicEndpointMetrics"/>
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB3"/>
- <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl">
- <property
name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
- </bean>
+ <bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.spi.deployment.WebAppDesciptorModifierImpl"/>
<bean name="WSWebXMLRewriter"
class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
Modified:
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml
===================================================================
---
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native50.sar/META-INF/jbossws-beans.xml 2007-07-11
21:51:39 UTC (rev 3853)
@@ -39,9 +39,28 @@
<!--
The stack specific deployment aspects
-->
+ <bean name="WSNativeContextPropertiesDeploymentAspect"
class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+ <property name="provides">ContextProperties</property>
+ <property name="contextProperties">
+ <map keyClass="java.lang.String"
valueClass="java.lang.String">
+
<entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.stack.jbws.ServiceEndpointServlet</value></entry>
+ </map>
+ </property>
+ <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ </bean>
+
<bean name="WSNativeEagerInitializeDeploymentAspect"
class="org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect">
+ <property
name="requires">ContainerClassLoader,UnifiedMetaDataModel</property>
<property name="provides">InitializedMetaDataModel</property>
- <property name="requires">AssociatedClassLoader</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -67,6 +86,7 @@
</bean>
<bean name="WSNativeEventingDeploymentAspect"
class="org.jboss.wsf.stack.jbws.EventingDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -75,6 +95,7 @@
</bean>
<bean name="WSNativePublishContractDeploymentAspect"
class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<property name="provides">PublishedContract</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
@@ -84,6 +105,7 @@
</bean>
<bean name="WSNativeServiceEndpointInvokerDeploymentAspect"
class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect">
+ <property name="requires">UnifiedMetaDataModel</property>
<install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
@@ -91,33 +113,14 @@
</install>
</bean>
- <bean name="WSNativeUnifiedMetaDataAssociationDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeploymentAspect">
- <property name="requires">UnifiedMetaDataModel</property>
- <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
- </bean>
-
<bean name="WSNativeUnifiedMetaDataDeploymentAspect"
class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="provides">UnifiedMetaDataModel</property>
- <property name="requires">ContainerMetaData</property>
- <install bean="WSDeploymentAspectManagerJSE"
method="addDeploymentAspect">
+ <property name="requires">ContainerMetaData,
URLPattern</property>
+ <property name="provides">UnifiedMetaDataModel,
AllowClassLoaderInjection</property>
+ <install bean="WSMainDeploymentAspectManager"
method="addDeploymentAspect">
<parameter>
<this/>
</parameter>
</install>
- <install bean="WSDeploymentAspectManagerEJB"
method="addDeploymentAspect">
- <parameter>
- <this/>
- </parameter>
- </install>
</bean>
</deployment>
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -91,8 +91,20 @@
}
}
+ // Add LAST_DEPLOYMENT_ASPECT
+ itAll = allAspects.iterator();
+ while (itAll.hasNext())
+ {
+ DeploymentAspect aspect = itAll.next();
+ if (LAST_DEPLOYMENT_ASPECT.equals(aspect.getRequires()))
+ {
+ sortedAspects.add(aspect);
+ itAll.remove();
+ }
+ }
+
if (allAspects.size() != 0)
- throw new IllegalStateException("Cannot sort");
+ throw new IllegalStateException("Cannot sort: " + allAspects);
for (DeploymentAspect aspect : sortedAspects)
log.info(name + ": " + aspect);
@@ -139,7 +151,11 @@
for (int i = 0; i < getDeploymentAspects().size(); i++)
{
DeploymentAspect aspect = getDeploymentAspects().get(i);
- if (providedConditions.containsAll(aspect.getRequiresAsSet()) == false)
+
+ // Check that all required aspects are met
+ Set<String> requiredSet = aspect.getRequiresAsSet();
+ requiredSet.remove(LAST_DEPLOYMENT_ASPECT);
+ if (providedConditions.containsAll(requiredSet) == false)
throw new IllegalStateException("Required conditions '" +
aspect.getRequires() + "' not satisfied by '" + providedConditions +
"' for: " + aspect);
logInvocation(aspect, "Create");
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -33,6 +33,8 @@
*/
public interface DeploymentAspectManager
{
+ static final String LAST_DEPLOYMENT_ASPECT = "LAST_DEPLOYMENT_ASPECT";
+
/** Get the name for this aspect manager */
String getName();
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/EndpointNameDeploymentAspect.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -40,7 +40,7 @@
public void create(Deployment dep)
{
String contextRoot = dep.getService().getContextRoot();
- if (contextRoot.startsWith("/") == false)
+ if (contextRoot == null || contextRoot.startsWith("/") == false)
throw new IllegalStateException("Context root expected to start with
leading slash: " + contextRoot);
for (Endpoint ep : dep.getService().getEndpoints())
Modified:
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java
===================================================================
---
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifierImpl.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -38,21 +38,13 @@
// logging support
private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
- // The configured service endpoint servlet
- private String servletClass;
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws
ClassNotFoundException
{
+ String propKey = "SERVICE_ENDPOINT_SERVLET";
+ String servletClass = (String)dep.getContext().getProperty(propKey);
+ if (servletClass == null)
+ throw new IllegalStateException("Cannot obtain context property: " +
propKey);
+
RewriteResults results = new RewriteResults();
Element root = webXml.getRootElement();
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-11
21:33:09 UTC (rev 3852)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-07-11
21:51:39 UTC (rev 3853)
@@ -22,14 +22,12 @@
// $Id$
package org.jboss.ws.metadata.builder.jaxws;
-import java.util.Map;
-
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -47,7 +45,7 @@
*/
public UnifiedMetaData buildMetaData(Deployment dep, UnifiedDeploymentInfo udi)
{
- if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" +
udi.getCanonicalName() + "]");
+ log.debug("START buildMetaData: [name=" + udi.getCanonicalName() +
"]");
try
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.vfRoot);
@@ -58,23 +56,14 @@
throw new WSException("Deployment class loader not initialized");
// For every bean
- UnifiedWebMetaData webMetaData = (UnifiedWebMetaData)udi.metaData;
- Map<String, String> servletClassMap = webMetaData.getServletClassNames();
- for (String servletName : servletClassMap.keySet())
+ for (Endpoint ep : dep.getService().getEndpoints())
{
- String servletClassName = servletClassMap.get(servletName);
- try
- {
- Class beanClass = udi.classLoader.loadClass(servletClassName);
- JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi,
beanClass, servletName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load service endpoint class: " +
servletClassName);
- }
+ String shortName = ep.getShortName();
+ Class beanClass = ep.getTargetBeanClass();
+ JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, udi,
beanClass, shortName);
}
-
- if(log.isDebugEnabled()) log.debug("END buildMetaData: " +
wsMetaData);
+
+ log.debug("END buildMetaData: " + wsMetaData);
return wsMetaData;
}
catch (RuntimeException rte)