[jbossws-commits] JBossWS SVN: r4244 - container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40 and 14 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Aug 8 05:19:05 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-08-08 05:19:04 -0400 (Wed, 08 Aug 2007)
New Revision: 4244

Added:
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPostJSE.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPreJSE.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPostJSE.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPreJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPostJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPostJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java
Removed:
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE2.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java
   container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE2.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE2.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
   container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE2.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE2.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE2.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/Phase2DeployerHookJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE.java
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE2.java
Modified:
   container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
   container/jboss40/trunk/version.properties
   container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml
   container/jboss42/trunk/version.properties
   container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java
   container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
   container/jboss50/trunk/version.properties
   framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
   framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
   framework/trunk/version.properties
   spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
   stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml
   stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml
   stack/native/trunk/src/main/resources/jbossws-native-config.xml
   stack/native/trunk/version.properties
Log:
Use 'Pre' and 'Post' for JSE handling
Move notion of parent to DAM instead of DAM intaller
Revert container integration version back to snapshot
Sort out commented requires, provides clauses



Deleted: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss40;
-
-//$Id: JAXRPCDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler at jboss.com $
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.common.URLLoaderAdapter;
-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 at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE extends AbstractDeployerHookJSE
-{
-   /** 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(DeploymentInfo di)
-   {
-      ArchiveDeployment dep = newDeployment(di);
-      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
-      dep.setRuntimeClassLoader(null);
-      dep.setType(getDeploymentType());
-
-      Service service = dep.getService();
-
-      WebMetaData webMetaData = (WebMetaData)di.metaData;
-      if (webMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain web meta data");
-
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
-      if (wsMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
-
-      // Copy the attachments
-      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
-      dep.addAttachment(WebMetaData.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");
-
-            Servlet servlet = getServletForName(webMetaData, servletLink);
-            String servletClass = servlet.getServletClass();
-
-            try
-            {
-               ClassLoader loader = dep.getInitialClassLoader();
-               Class<?> epBean = loader.loadClass(servletClass.trim());
-
-               // If this is a servlet we defer the the bean creation 
-               if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
-                  servletClass = null;
-            }
-            catch (ClassNotFoundException ex)
-            {
-               log.warn("Cannot load servlet class: " + servletClass);
-            }
-
-            // Create the endpoint
-            Endpoint ep = newEndpoint(servletClass);
-            ep.setShortName(servletLink);
-            service.addEndpoint(ep);
-         }
-      }
-
-      return dep;
-   }
-
-   private Servlet getServletForName(WebMetaData wmd, String servletLink)
-   {
-      Iterator it = wmd.getServletClassMap().entrySet().iterator();
-      while (it.hasNext())
-      {
-         Map.Entry entry = (Entry)it.next();
-         String servletName = (String)entry.getKey();
-         String servletClass = (String)entry.getValue();
-         if (servletLink.equals(servletName))
-         {
-            return new Servlet(servletName, servletClass);
-         }
-      }
-      throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
-   }
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      if (super.isWebServiceDeployment(unit) == false)
-         return false;
-
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
-      return wsMetaData != null;
-   }
-}

Deleted: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE2.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,50 +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.jboss40;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.deployment.DeploymentInfo;
-
-/**
- * A deployer JAXRPC JSE Endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** Get the deployment type this deployer can handle
-    */
-   public Deployment.DeploymentType getDeploymentType()
-   {
-      return Deployment.DeploymentType.JAXRPC_JSE;
-   }
-
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
-      return (wsMetaData!=null && super.isWebServiceDeployment(unit));
-   }
-}

Copied: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPostJSE.java (from rev 4243, container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE2.java)
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,50 @@
+/*
+ * 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.jboss40;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.deployment.DeploymentInfo;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPostJSE extends Phase2DeployerHookJSE
+{
+   /** Get the deployment type this deployer can handle
+    */
+   public Deployment.DeploymentType getDeploymentType()
+   {
+      return Deployment.DeploymentType.JAXRPC_JSE;
+   }
+
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+      return (wsMetaData!=null && super.isWebServiceDeployment(unit));
+   }
+}

Copied: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPreJSE.java (from rev 4243, container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookJSE.java)
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPreJSE.java	                        (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXRPCDeployerHookPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss40;
+
+//$Id: JAXRPCDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler at jboss.com $
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+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 at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPreJSE extends AbstractDeployerHookJSE
+{
+   /** 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(DeploymentInfo di)
+   {
+      ArchiveDeployment dep = newDeployment(di);
+      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+      dep.setRuntimeClassLoader(null);
+      dep.setType(getDeploymentType());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)di.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.addAttachment(WebMetaData.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");
+
+            Servlet servlet = getServletForName(webMetaData, servletLink);
+            String servletClass = servlet.getServletClass();
+
+            try
+            {
+               ClassLoader loader = dep.getInitialClassLoader();
+               Class<?> epBean = loader.loadClass(servletClass.trim());
+
+               // If this is a servlet we defer the the bean creation 
+               if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
+                  servletClass = null;
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + servletClass);
+            }
+
+            // Create the endpoint
+            Endpoint ep = newEndpoint(servletClass);
+            ep.setShortName(servletLink);
+            service.addEndpoint(ep);
+         }
+      }
+
+      return dep;
+   }
+
+   private Servlet getServletForName(WebMetaData wmd, String servletLink)
+   {
+      Iterator it = wmd.getServletClassMap().entrySet().iterator();
+      while (it.hasNext())
+      {
+         Map.Entry entry = (Entry)it.next();
+         String servletName = (String)entry.getKey();
+         String servletClass = (String)entry.getValue();
+         if (servletLink.equals(servletName))
+         {
+            return new Servlet(servletName, servletClass);
+         }
+      }
+      throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+      return wsMetaData != null;
+   }
+}

Deleted: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss40;
-
-//$Id: JAXWSDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler at jboss.com $
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.common.URLLoaderAdapter;
-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;
-
-/**
- * A deployer JAXWS JSE Endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXWSDeployerHookJSE extends AbstractDeployerHookJSE
-{
-   /** Get the deployemnt type this deployer can handle 
-    */
-   public DeploymentType getDeploymentType()
-   {
-      return DeploymentType.JAXWS_JSE;
-   }
-
-   @Override
-   public Deployment createDeployment(DeploymentInfo di)
-   {
-      ArchiveDeployment dep = newDeployment(di);
-      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
-      dep.setRuntimeClassLoader(null);
-      dep.setType(getDeploymentType());
-
-      Service service = dep.getService();
-
-      WebMetaData webMetaData = (WebMetaData)di.metaData;
-      if (webMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain web meta data");
-
-      // Copy the attachments
-      dep.addAttachment(WebMetaData.class, webMetaData);
-
-      List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
-      for (Servlet servlet : servlets)
-      {
-         String servletName = servlet.getServletName();
-         String servletClass = servlet.getServletClass();
-
-         // Create the endpoint
-         Endpoint ep = newEndpoint(servletClass);
-         ep.setShortName(servletName);
-         service.addEndpoint(ep);
-      }
-
-      return dep;
-   }
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      if (super.isWebServiceDeployment(unit) == false)
-         return false;
-
-      boolean isWebServiceDeployment = false;
-      try
-      {
-         WebMetaData webMetaData = (WebMetaData)unit.metaData;
-         List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
-         isWebServiceDeployment = servlets.size() > 0;
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot process web deployment", ex);
-      }
-
-      return isWebServiceDeployment;
-   }
-
-   private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
-   {
-      List<Servlet> servlets = new ArrayList<Servlet>();
-      Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
-      while (it.hasNext())
-      {
-         Map.Entry entry = (Entry)it.next();
-         String servletName = (String)entry.getKey();
-         String servletClassName = (String)entry.getValue();
-
-         // 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(new Servlet(servletName, servletClassName));
-         }
-         catch (ClassNotFoundException ex)
-         {
-            log.warn("Cannot load servlet class: " + servletClassName);
-            continue;
-         }
-      }
-      return servlets;
-   }
-}
\ No newline at end of file

Deleted: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE2.java
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,51 +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.jboss40;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.deployment.DeploymentInfo;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class JAXWSDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** Get the deployment type this deployer can handle
-    */
-   public Deployment.DeploymentType getDeploymentType()
-   {
-      return Deployment.DeploymentType.JAXWS_JSE;
-   }
-
-
-   /**
-    * Reject JAX-RPC deployments
-    */
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");  // JAX-RPC artifact
-      return (wsMetaData==null && super.isWebServiceDeployment(unit));
-   }
-}

Copied: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPostJSE.java (from rev 4243, container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE2.java)
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,51 @@
+/*
+ * 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.jboss40;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.deployment.DeploymentInfo;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class JAXWSDeployerHookPostJSE extends Phase2DeployerHookJSE
+{
+   /** Get the deployment type this deployer can handle
+    */
+   public Deployment.DeploymentType getDeploymentType()
+   {
+      return Deployment.DeploymentType.JAXWS_JSE;
+   }
+
+
+   /**
+    * Reject JAX-RPC deployments
+    */
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");  // JAX-RPC artifact
+      return (wsMetaData==null && super.isWebServiceDeployment(unit));
+   }
+}

Copied: container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPreJSE.java (from rev 4243, container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookJSE.java)
===================================================================
--- container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPreJSE.java	                        (rev 0)
+++ container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/JAXWSDeployerHookPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss40;
+
+//$Id: JAXWSDeployerHookJSE.java 4116 2007-08-02 16:39:02Z thomas.diesler at jboss.com $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+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;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookPreJSE extends AbstractDeployerHookJSE
+{
+   /** Get the deployemnt type this deployer can handle 
+    */
+   public DeploymentType getDeploymentType()
+   {
+      return DeploymentType.JAXWS_JSE;
+   }
+
+   @Override
+   public Deployment createDeployment(DeploymentInfo di)
+   {
+      ArchiveDeployment dep = newDeployment(di);
+      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+      dep.setRuntimeClassLoader(null);
+      dep.setType(getDeploymentType());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)di.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      // Copy the attachments
+      dep.addAttachment(WebMetaData.class, webMetaData);
+
+      List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
+      for (Servlet servlet : servlets)
+      {
+         String servletName = servlet.getServletName();
+         String servletClass = servlet.getServletClass();
+
+         // Create the endpoint
+         Endpoint ep = newEndpoint(servletClass);
+         ep.setShortName(servletName);
+         service.addEndpoint(ep);
+      }
+
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      boolean isWebServiceDeployment = false;
+      try
+      {
+         WebMetaData webMetaData = (WebMetaData)unit.metaData;
+         List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+         isWebServiceDeployment = servlets.size() > 0;
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot process web deployment", ex);
+      }
+
+      return isWebServiceDeployment;
+   }
+
+   private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
+   {
+      List<Servlet> servlets = new ArrayList<Servlet>();
+      Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+      while (it.hasNext())
+      {
+         Map.Entry entry = (Entry)it.next();
+         String servletName = (String)entry.getKey();
+         String servletClassName = (String)entry.getValue();
+
+         // 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(new Servlet(servletName, servletClassName));
+         }
+         catch (ClassNotFoundException ex)
+         {
+            log.warn("Cannot load servlet class: " + servletClassName);
+            continue;
+         }
+      }
+      return servlets;
+   }
+}
\ No newline at end of file

Modified: container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/src/main/resources/jbossws-jboss40-config.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -48,8 +48,8 @@
     Register DeployerHooks with JBoss deployers 
   -->
   <!-- Phase 1-->
-  <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookPreJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
     <property name="phaseOneInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -57,8 +57,8 @@
     </property>
   </bean>
   <!-- Phase 2 -->
-  <bean name="WSDeployerHook_JAXRPC_JSE2" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss40.JAXRPCDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
     <property name="phaseTwoInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -75,8 +75,8 @@
     </property>
   </bean>
 
-  <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookPreJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
     <property name="phaseOneInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -84,8 +84,8 @@
     </property>
   </bean>
    <!-- Phase 2 -->
-  <bean name="WSDeployerHook_JAXWS_JSE2" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeployerHook_JAXWS_JSE2" class="org.jboss.wsf.container.jboss40.JAXWSDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
     <property name="phaseTwoInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -105,11 +105,12 @@
   <!-- 
     Each DeploymentAspectManger maintains a list of DeploymentAspects
   -->
-  <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeploymentAspectManagerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="name">WSDeploymentAspectManagerPreJSE</property>
   </bean>
-  <bean name="WSDeploymentAspectManagerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeploymentAspectManagerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="parent"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
+    <property name="name">WSDeploymentAspectManagerPostJSE</property>
   </bean>
   <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
     <property name="name">WSDeploymentAspectManagerEJB</property>
@@ -168,6 +169,11 @@
     <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
   </bean>
   
+  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss40.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>
@@ -185,11 +191,6 @@
     <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
   </bean>
 
-  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss40.RuntimeLoaderDeploymentAspect">
-    <property name="requires">ContainerMetaData</property>
-    <property name="provides">RuntimeLoader</property>
-  </bean>      
-  
   <!-- Deployment aspect helper beans -->
   <bean name="WSApplicationMetaDataAdapterEJB21" class="org.jboss.wsf.container.jboss40.EJBArchiveMetaDataAdapterEJB21"/>
   <bean name="WSApplicationMetaDataAdapterEJB3" class="org.jboss.wsf.container.jboss40.EJBArchiveMetaDataAdapterEJB3"/>
@@ -211,36 +212,35 @@
   <!-- Deployment aspect installers -->  
 
   <!-- Phase 1 -->
-  <bean name="WSDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
+        <inject bean="WSContextRootDeploymentAspect"/>
+        <inject bean="WSEndpointHandlerDeploymentAspect"/>
         <inject bean="WSModifyWebMetaDataDeploymentAspect"/>
-        <inject bean="WSContextRootDeploymentAspect"/>
         <inject bean="WSURLPatternDeploymentAspect"/>
-        <inject bean="WSEndpointHandlerDeploymentAspect"/>
       </set>
     </property>
   </bean>
 
   <!-- Phase 2 -->
-  <bean name="WSDeploymentAspectInstallerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="parent"><inject bean="WSDeploymentAspectManagerJSE"/></property>
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE2"/></property>
+  <bean name="WSDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>        
         <inject bean="WSEndpointAddressDeploymentAspect"/>
         <inject bean="WSEndpointLifecycleDeploymentAspect"/>
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>        
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE</depends>
+    <depends>WSDeploymentAspectInstallerPreJSE</depends>
   </bean>
 
   <bean name="WSDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
@@ -248,7 +248,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
         <inject bean="WSContextRootDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
@@ -257,6 +256,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSURLPatternDeploymentAspect"/>
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
@@ -268,7 +268,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/> 
         <inject bean="WSEndpointAPIDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
         <inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -276,6 +275,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/> 
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
       </set>

Modified: container/jboss40/trunk/version.properties
===================================================================
--- container/jboss40/trunk/version.properties	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss40/trunk/version.properties	2007-08-08 09:19:04 UTC (rev 4244)
@@ -5,8 +5,8 @@
 specification.vendor=JBoss (http://www.jboss.org)
 specification.version=jbossws-2.0
 
-version.id=2.0.1.CR2
-repository.id=2.0.1.CR2
+version.id=2.0.1.GA
+repository.id=snapshot
 
 implementation.title=JBoss Web Services - Integration JBoss40 
 implementation.url=http://www.jboss.org/products/jbossws

Deleted: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss42;
-
-//$Id$
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.common.URLLoaderAdapter;
-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 at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE extends AbstractDeployerHookJSE
-{
-   /** 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(DeploymentInfo di)
-   {
-      ArchiveDeployment dep = newDeployment(di);
-      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
-      dep.setRuntimeClassLoader(null);
-      dep.setType(getDeploymentType());
-
-      Service service = dep.getService();
-
-      WebMetaData webMetaData = (WebMetaData)di.metaData;
-      if (webMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain web meta data");
-
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
-      if (wsMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
-
-      // Copy the attachments
-      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
-      dep.addAttachment(WebMetaData.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");
-
-            Servlet servlet = getServletForName(webMetaData, servletLink);
-            String servletClass = servlet.getServletClass();
-
-            try
-            {
-               ClassLoader loader = dep.getInitialClassLoader();
-               Class<?> epBean = loader.loadClass(servletClass.trim());
-
-               // If this is a servlet we defer the the bean creation 
-               if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
-                  servletClass = null;
-            }
-            catch (ClassNotFoundException ex)
-            {
-               log.warn("Cannot load servlet class: " + servletClass);
-            }
-
-            // Create the endpoint
-            Endpoint ep = newEndpoint(servletClass);
-            ep.setShortName(servletLink);
-            service.addEndpoint(ep);
-         }
-      }
-
-      return dep;
-   }
-
-   private Servlet getServletForName(WebMetaData wmd, String servletLink)
-   {
-      Iterator it = wmd.getServletClassMap().entrySet().iterator();
-      while (it.hasNext())
-      {
-         Map.Entry entry = (Entry)it.next();
-         String servletName = (String)entry.getKey();
-         String servletClass = (String)entry.getValue();
-         if (servletLink.equals(servletName))
-         {
-            return new Servlet(servletName, servletClass);
-         }
-      }
-      throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
-   }
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      if (super.isWebServiceDeployment(unit) == false)
-         return false;
-
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
-      return wsMetaData != null;
-   }
-}

Deleted: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE2.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.deployment.DeploymentInfo;
-
-/**
- * A deployer JAXRPC JSE Endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** Get the deployment type this deployer can handle
-    */
-   public Deployment.DeploymentType getDeploymentType()
-   {
-      return Deployment.DeploymentType.JAXRPC_JSE;
-   }
-
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
-      return (wsMetaData!=null && super.isWebServiceDeployment(unit));
-   }
-}

Copied: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPostJSE.java (from rev 4243, container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE2.java)
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.deployment.DeploymentInfo;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPostJSE extends Phase2DeployerHookJSE
+{
+   /** Get the deployment type this deployer can handle
+    */
+   public Deployment.DeploymentType getDeploymentType()
+   {
+      return Deployment.DeploymentType.JAXRPC_JSE;
+   }
+
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+      return (wsMetaData!=null && super.isWebServiceDeployment(unit));
+   }
+}

Copied: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java (from rev 4243, container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java)
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java	                        (rev 0)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss42;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+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 at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPreJSE extends AbstractDeployerHookJSE
+{
+   /** 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(DeploymentInfo di)
+   {
+      ArchiveDeployment dep = newDeployment(di);
+      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+      dep.setRuntimeClassLoader(null);
+      dep.setType(getDeploymentType());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)di.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
+      if (wsMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+      // Copy the attachments
+      dep.addAttachment(WebservicesMetaData.class, wsMetaData);
+      dep.addAttachment(WebMetaData.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");
+
+            Servlet servlet = getServletForName(webMetaData, servletLink);
+            String servletClass = servlet.getServletClass();
+
+            try
+            {
+               ClassLoader loader = dep.getInitialClassLoader();
+               Class<?> epBean = loader.loadClass(servletClass.trim());
+
+               // If this is a servlet we defer the the bean creation 
+               if (javax.servlet.Servlet.class.isAssignableFrom(epBean))
+                  servletClass = null;
+            }
+            catch (ClassNotFoundException ex)
+            {
+               log.warn("Cannot load servlet class: " + servletClass);
+            }
+
+            // Create the endpoint
+            Endpoint ep = newEndpoint(servletClass);
+            ep.setShortName(servletLink);
+            service.addEndpoint(ep);
+         }
+      }
+
+      return dep;
+   }
+
+   private Servlet getServletForName(WebMetaData wmd, String servletLink)
+   {
+      Iterator it = wmd.getServletClassMap().entrySet().iterator();
+      while (it.hasNext())
+      {
+         Map.Entry entry = (Entry)it.next();
+         String servletName = (String)entry.getKey();
+         String servletClass = (String)entry.getValue();
+         if (servletLink.equals(servletName))
+         {
+            return new Servlet(servletName, servletClass);
+         }
+      }
+      throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+      return wsMetaData != null;
+   }
+}

Deleted: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss42;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.common.URLLoaderAdapter;
-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;
-
-/**
- * A deployer JAXWS JSE Endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXWSDeployerHookJSE extends AbstractDeployerHookJSE
-{
-   /** Get the deployemnt type this deployer can handle 
-    */
-   public DeploymentType getDeploymentType()
-   {
-      return DeploymentType.JAXWS_JSE;
-   }
-
-   @Override
-   public Deployment createDeployment(DeploymentInfo di)
-   {
-      ArchiveDeployment dep = newDeployment(di);
-      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
-      dep.setRuntimeClassLoader(null);
-      dep.setType(getDeploymentType());
-
-      Service service = dep.getService();
-
-      WebMetaData webMetaData = (WebMetaData)di.metaData;
-      if (webMetaData == null)
-         throw new IllegalStateException("Deployment unit does not contain web meta data");
-
-      // Copy the attachments
-      dep.addAttachment(WebMetaData.class, webMetaData);
-
-      List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
-      for (Servlet servlet : servlets)
-      {
-         String servletName = servlet.getServletName();
-         String servletClass = servlet.getServletClass();
-
-         // Create the endpoint
-         Endpoint ep = newEndpoint(servletClass);
-         ep.setShortName(servletName);
-         service.addEndpoint(ep);
-      }
-
-      return dep;
-   }
-
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {
-      if (super.isWebServiceDeployment(unit) == false)
-         return false;
-
-      boolean isWebServiceDeployment = false;
-      try
-      {
-         WebMetaData webMetaData = (WebMetaData)unit.metaData;
-         List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
-         isWebServiceDeployment = servlets.size() > 0;
-      }
-      catch (Exception ex)
-      {
-         log.error("Cannot process web deployment", ex);
-      }
-
-      return isWebServiceDeployment;
-   }
-
-   private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
-   {
-      List<Servlet> servlets = new ArrayList<Servlet>();
-      Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
-      while (it.hasNext())
-      {
-         Map.Entry entry = (Entry)it.next();
-         String servletName = (String)entry.getKey();
-         String servletClassName = (String)entry.getValue();
-
-         // 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(new Servlet(servletName, servletClassName));
-         }
-         catch (ClassNotFoundException ex)
-         {
-            log.warn("Cannot load servlet class: " + servletClassName);
-            continue;
-         }
-      }
-      return servlets;
-   }
-}
\ No newline at end of file

Deleted: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE2.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class JAXWSDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** Get the deployment type this deployer can handle
-    */
-   public Deployment.DeploymentType getDeploymentType()
-   {
-      return Deployment.DeploymentType.JAXWS_JSE;
-   }
-
-
-   /**
-    * Reject JAX-RPC deployments
-    */
-   @Override
-   public boolean isWebServiceDeployment(DeploymentInfo unit)
-   {     
-      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");  // JAX-RPC artifact
-      return (wsMetaData==null && super.isWebServiceDeployment(unit));
-   }
-}

Copied: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPostJSE.java (from rev 4243, container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE2.java)
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss42;
+
+// $Id$
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class JAXWSDeployerHookPostJSE extends Phase2DeployerHookJSE
+{
+   /** Get the deployment type this deployer can handle
+    */
+   public Deployment.DeploymentType getDeploymentType()
+   {
+      return Deployment.DeploymentType.JAXWS_JSE;
+   }
+
+   /**
+    * Reject JAX-RPC deployments
+    */
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml"); // JAX-RPC artifact
+      return (wsMetaData == null && super.isWebServiceDeployment(unit));
+   }
+}

Copied: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java (from rev 4243, container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java)
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java	                        (rev 0)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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.jboss42;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.common.URLLoaderAdapter;
+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;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookPreJSE extends AbstractDeployerHookJSE
+{
+   /** Get the deployemnt type this deployer can handle 
+    */
+   public DeploymentType getDeploymentType()
+   {
+      return DeploymentType.JAXWS_JSE;
+   }
+
+   @Override
+   public Deployment createDeployment(DeploymentInfo di)
+   {
+      ArchiveDeployment dep = newDeployment(di);
+      dep.setRootFile(new URLLoaderAdapter(di.localUrl));
+      dep.setRuntimeClassLoader(null);
+      dep.setType(getDeploymentType());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = (WebMetaData)di.metaData;
+      if (webMetaData == null)
+         throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+      // Copy the attachments
+      dep.addAttachment(WebMetaData.class, webMetaData);
+
+      List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
+      for (Servlet servlet : servlets)
+      {
+         String servletName = servlet.getServletName();
+         String servletClass = servlet.getServletClass();
+
+         // Create the endpoint
+         Endpoint ep = newEndpoint(servletClass);
+         ep.setShortName(servletName);
+         service.addEndpoint(ep);
+      }
+
+      return dep;
+   }
+
+   @Override
+   public boolean isWebServiceDeployment(DeploymentInfo unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      boolean isWebServiceDeployment = false;
+      try
+      {
+         WebMetaData webMetaData = (WebMetaData)unit.metaData;
+         List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+         isWebServiceDeployment = servlets.size() > 0;
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot process web deployment", ex);
+      }
+
+      return isWebServiceDeployment;
+   }
+
+   private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
+   {
+      List<Servlet> servlets = new ArrayList<Servlet>();
+      Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+      while (it.hasNext())
+      {
+         Map.Entry entry = (Entry)it.next();
+         String servletName = (String)entry.getKey();
+         String servletClassName = (String)entry.getValue();
+
+         // 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(new Servlet(servletName, servletClassName));
+         }
+         catch (ClassNotFoundException ex)
+         {
+            log.warn("Cannot load servlet class: " + servletClassName);
+            continue;
+         }
+      }
+      return servlets;
+   }
+}
\ No newline at end of file

Modified: container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/src/main/resources/jbossws-jboss42-config.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -57,8 +57,8 @@
   -->
 
   <!-- Phase 1 -->
-  <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookPreJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
     <property name="phaseOneInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -67,8 +67,8 @@
   </bean>
 
   <!-- Phase 2 -->
-  <bean name="WSDeployerHook_JAXRPC_JSE2" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss42.JAXRPCDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
     <property name="phaseTwoInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -86,8 +86,8 @@
   </bean>
 
   <!-- Phase 1 -->
-  <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookPreJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
     <property name="phaseOneInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -96,8 +96,8 @@
   </bean>
 
   <!-- Phase 2 -->
-  <bean name="WSDeployerHook_JAXWS_JSE2" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeployerHook_JAXWS_POST_JSE" class="org.jboss.wsf.container.jboss42.JAXWSDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
     <property name="phaseTwoInterceptors">
       <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
         <value>jboss.ws:service=DeployerInterceptorJSE</value>
@@ -117,11 +117,12 @@
   <!-- 
     Each DeploymentAspectManger maintains a list of DeploymentAspects
   -->
-  <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeploymentAspectManagerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="name">WSDeploymentAspectManagerPreJSE</property>
   </bean>
-  <bean name="WSDeploymentAspectManagerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeploymentAspectManagerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="parent"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
+    <property name="name">WSDeploymentAspectManagerPostJSE</property>
   </bean>
   <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
     <property name="name">WSDeploymentAspectManagerEJB</property>
@@ -144,7 +145,7 @@
   </bean>
   
   <bean name="WSEndpointAPIDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointAPIDeploymentAspect">
-    <property name="provides">ContainerMetaData, URLPattern, VFSRoot</property>
+    <property name="provides">ContainerMetaData, RuntimeLoader, URLPattern, VFSRoot</property>
   </bean>
 
   <bean name="WSEndpointAddressDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointAddressDeploymentAspect">
@@ -176,11 +177,15 @@
   </bean>
   
   <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss42.ModifyWebMetaDataDeploymentAspect">
-    <!--property name="requires">ContextProperties, ContainerMetaData, StackDescriptor</property-->
-    <property name="requires">ContextProperties, ContainerMetaData</property>
+    <property name="requires">ContextProperties, ContainerMetaData, StackDescriptor</property>
     <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
   </bean>
   
+  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss42.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>
@@ -198,11 +203,6 @@
     <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
   </bean>
 
-  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss42.RuntimeLoaderDeploymentAspect">
-    <property name="requires">ContainerMetaData</property>
-    <property name="provides">RuntimeLoader</property>
-  </bean>
-  
   <!-- Deployment aspect helper beans -->
   <bean name="WSApplicationMetaDataAdapterEJB21" class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB21"/>
   <bean name="WSApplicationMetaDataAdapterEJB3" class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB3"/>
@@ -222,36 +222,35 @@
   
   <!-- Deployment aspect installers -->
   <!-- Phase 1 -->
-  <bean name="WSDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
-        <inject bean="WSModifyWebMetaDataDeploymentAspect"/>
         <inject bean="WSContextRootDeploymentAspect"/>
-        <inject bean="WSURLPatternDeploymentAspect"/>
         <inject bean="WSEndpointHandlerDeploymentAspect"/>
+        <inject bean="WSModifyWebMetaDataDeploymentAspect"/>
+        <inject bean="WSURLPatternDeploymentAspect"/>
       </set>
     </property>
   </bean>
 
   <!-- Phase 2 -->
-  <bean name="WSDeploymentAspectInstallerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="parent"><inject bean="WSDeploymentAspectManagerJSE"/></property>
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE2"/></property>
+  <bean name="WSDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
         <inject bean="WSEndpointLifecycleDeploymentAspect"/>
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE</depends>
+    <depends>WSDeploymentAspectInstallerPreJSE</depends>
   </bean>
 
   <bean name="WSDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
@@ -259,7 +258,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
         <inject bean="WSContextRootDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
@@ -268,6 +266,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSURLPatternDeploymentAspect"/>
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
@@ -279,7 +278,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSEndpointAPIDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
         <inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -287,6 +285,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
       </set>

Modified: container/jboss42/trunk/version.properties
===================================================================
--- container/jboss42/trunk/version.properties	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss42/trunk/version.properties	2007-08-08 09:19:04 UTC (rev 4244)
@@ -5,8 +5,8 @@
 specification.vendor=JBoss (http://www.jboss.org)
 specification.version=jbossws-2.0
 
-version.id=2.0.1.CR2
-repository.id=2.0.1.CR2
+version.id=2.0.1.GA
+repository.id=snapshot
 
 implementation.title=JBoss Web Services - Integration JBoss42 
 implementation.url=http://www.jboss.org/products/jbossws

Copied: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java (from rev 4243, container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/Phase2DeployerHookJSE.java)
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,109 @@
+/*
+ * 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 org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.NameValuePair;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+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 do it by inspecting the Servlet init parameter.
+    * @param unit
+    * @return
+    */
+   @Override
+   public boolean isWebServiceDeployment(DeploymentUnit unit)
+   {
+      if (super.isWebServiceDeployment(unit) == false)
+         return false;
+
+      Deployment deployment = unit.getAttachment(Deployment.class);
+      boolean isModified = false;
+      if (deployment != null)
+         isModified = isModifiedServletClass(deployment);
+      return isModified;
+   }
+
+   private boolean isModifiedServletClass(Deployment dep)
+   {
+      boolean modified = false;
+
+      WebMetaData webMetaData = dep.getAttachment(WebMetaData.class);
+      if (webMetaData != null)
+      {
+         for (Servlet servlet : webMetaData.getServlets())
+         {
+            String orgServletClass = servlet.getServletClass();
+
+            // JSP
+            if (orgServletClass == null || orgServletClass.length() == 0)
+            {
+               log.debug("Innore servlet class: " + orgServletClass);
+               continue;
+            }
+
+            modified = isAlreadyModified(servlet);
+         }
+      }
+
+      return modified;
+   }
+
+   private boolean isAlreadyModified(Servlet servlet)
+   {
+      Iterator itParams = servlet.getInitParams().iterator();
+      while (itParams.hasNext())
+      {
+         NameValuePair pair = (NameValuePair)itParams.next();
+         if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(pair.getName()))
+            return true;
+      }
+      return false;
+   }
+}

Deleted: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,121 +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.WebMetaData;
-import org.jboss.metadata.web.Servlet;
-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 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 at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE extends AbstractDeployerHookJSE
-{
-   /** 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); // TODO: Create RuntimeLoader aspect
-      dep.setType(getDeploymentType());
-
-      Service service = dep.getService();
-
-      WebMetaData webMetaData = unit.getAttachment(WebMetaData.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(WebMetaData.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");
-
-            Servlet servlet = getServletForName(webMetaData, servletLink);
-            String servletClass = servlet.getServletClass();
-
-            // Create the endpoint
-            Endpoint ep = newEndpoint(servletClass);
-            ep.setShortName(servletLink);
-            service.addEndpoint(ep);
-         }
-      }
-
-      return dep;
-   }
-
-   private Servlet getServletForName(WebMetaData wmd, String servletLink)
-   {
-      for (Servlet 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/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE2.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.web.Servlet;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * A deployer JAXRPC JSE Endpoints
- *
- * @author Thomas.Diesler at jboss.org
- * @since 25-Apr-2007
- */
-public class JAXRPCDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** 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));    
-   }
-}

Copied: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java (from rev 4243, container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE2.java)
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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;
+
+// $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 at 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));    
+   }
+}

Copied: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java (from rev 4243, container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java)
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,121 @@
+/*
+ * 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.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+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 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 at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookPreJSE extends AbstractDeployerHookJSE
+{
+   /** 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); // TODO: Create RuntimeLoader aspect
+      dep.setType(getDeploymentType());
+
+      Service service = dep.getService();
+
+      WebMetaData webMetaData = unit.getAttachment(WebMetaData.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(WebMetaData.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");
+
+            Servlet servlet = getServletForName(webMetaData, servletLink);
+            String servletClass = servlet.getServletClass();
+
+            // Create the endpoint
+            Endpoint ep = newEndpoint(servletClass);
+            ep.setShortName(servletLink);
+            service.addEndpoint(ep);
+         }
+      }
+
+      return dep;
+   }
+
+   private Servlet getServletForName(WebMetaData wmd, String servletLink)
+   {
+      for (Servlet 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/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE2.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,59 +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.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.NameValuePair;
-import org.jboss.metadata.web.Servlet;
-
-import java.util.Iterator;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class JAXWSDeployerHookJSE2 extends Phase2DeployerHookJSE
-{
-   /** 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));                    
-   }
-}

Copied: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java (from rev 4243, container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE2.java)
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class JAXWSDeployerHookPostJSE extends DeployerHookPostJSE
+{
+   /** 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/trunk/src/main/java/org/jboss/wsf/container/jboss50/Phase2DeployerHookJSE.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/Phase2DeployerHookJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/Phase2DeployerHookJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,107 +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.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.NameValuePair;
-import org.jboss.metadata.web.Servlet;
-
-import java.util.Iterator;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public abstract class Phase2DeployerHookJSE 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 do it by inspecting the Servlet init parameter.
-    * @param unit
-    * @return
-    */
-   @Override
-   public boolean isWebServiceDeployment(DeploymentUnit unit)
-   {
-      if(super.isWebServiceDeployment(unit) == false)
-         return false;
-
-      Deployment deployment = unit.getAttachment(Deployment.class);
-      boolean isModified =false;
-      if(deployment!=null)
-         isModified = isModifiedServletClass(deployment);
-      return isModified;
-   }
-
-   private boolean isModifiedServletClass(Deployment dep)
-   {
-      boolean modified = false;
-
-      WebMetaData webMetaData = dep.getAttachment(WebMetaData.class);
-      if (webMetaData != null)
-      {
-         for (Servlet servlet : webMetaData.getServlets())
-         {
-            String orgServletClass = servlet.getServletClass();
-
-            // JSP
-            if (orgServletClass == null || orgServletClass.length() == 0)
-            {
-               log.debug("Innore servlet class: " + orgServletClass);
-               continue;
-            }
-
-            modified = isAlreadyModified(servlet);
-         }
-      }
-
-      return modified;
-   }
-
-   private boolean isAlreadyModified(Servlet servlet)
-   {
-      Iterator itParams = servlet.getInitParams().iterator();
-      while (itParams.hasNext())
-      {
-         NameValuePair pair = (NameValuePair)itParams.next();
-         if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(pair.getName()))
-            return true;
-      }
-      return false;
-   }
-}

Modified: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/RuntimeLoaderDeploymentAspect.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -21,6 +21,8 @@
  */
 package org.jboss.wsf.container.jboss50;
 
+// $Id$
+
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.WebMetaData;
 import org.jboss.wsf.spi.deployment.Deployment;
@@ -32,7 +34,6 @@
  * and makes it available through the {@link Deployment}.
  *
  * @author Heiko.Braun at jboss.com
- * @version $Revision$
  */
 public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
 {

Deleted: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -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 at jboss.org
- * @since 24-Apr-2007
- */
-public class WebServiceDeployerJSE extends AbstractWebServiceDeployer
-{
-   private int relOrderWar;
-
-   public void setRelOrderWar(int relOrderWar)
-   {
-      this.relOrderWar = relOrderWar;
-   }
-
-   @Override
-   public int getRelativeOrder()
-   {
-      return relOrderWar - 1;
-   }
-}

Deleted: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE2.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE2.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerJSE2.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -1,43 +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;
-
-/**
- * @author Heiko.Braun at jboss.com
- * @version $Revision$
- */
-public class WebServiceDeployerJSE2 extends AbstractWebServiceDeployer
-{
-   private int relOrderPhase1;
-
-
-   public void setRelOrderPhase1(int relOrderPhase1)
-   {
-      this.relOrderPhase1 = relOrderPhase1;
-   }
-
-   @Override
-   public int getRelativeOrder()
-   {
-      return relOrderPhase1 + 1;
-   }
-}
\ No newline at end of file

Added: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPostJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+// $Id: $
+
+/**
+ * @author Heiko.Braun at 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

Added: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java	                        (rev 0)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/WebServiceDeployerPreJSE.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -0,0 +1,46 @@
+/*
+ * 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: WebServiceDeployerJSE.java 3146 2007-05-18 22:55:26Z thomas.diesler at jboss.com $
+
+/**
+ * This web service deployer for JSE
+ * 
+ * @author Thomas.Diesler at 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;
+   }
+}

Modified: container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -25,7 +25,8 @@
     The order of which is important
     
     1) EJBDeployer < WebServiceDeployerEJB
-    2) WebServiceDeployerJSE < WarDeployer 
+    2) WebServiceDeployerPreJSE < WarDeployer 
+    3) WarDeployer < WebServiceDeployerPostJSE
     
     Each WebServiceDeployer has a number of DeployerHooks registered with it
     
@@ -33,7 +34,7 @@
       - WSDeployerHook_JAXRPC_EJB21
       - WSDeployerHook_JAXWS_EJB3
     
-    - WebServiceDeployerJSE
+    - WebServiceDeployerPreJSE
       - WSDeployerHook_JAXRPC_JSE
       - WSDeployerHook_JAXWS_JSE
     
@@ -70,18 +71,18 @@
   <!--
     A web service deployer that hooks in before the WAR deployer
   -->
-  <bean name="WebServiceDeployerJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE">
+  <bean name="WebServiceDeployerPreJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPreJSE">
     <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
     <depends>WebAppParsingDeployer</depends>
   </bean>
 
   <!--
-     Phase 2 of JSE web service deployments.
-     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="WebServiceDeployerJSE2" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE2">
-    <property name="relOrderPhase1"><inject bean="WebServiceDeployerJSE" property="relativeOrder"/></property>
-    <depends>WebServiceDeployerJSE</depends>
+  <bean name="WebServiceDeployerPostJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerPostJSE">
+    <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
+    <depends>WebAppParsingDeployer</depends>
   </bean>
   
   <!--
@@ -89,34 +90,34 @@
   -->
 
   <!-- Phase 1 of JSE JAX-RPC -->
-  <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
-    <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+  <bean name="WSDeployerHook_JAXRPC_PRE_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookPreJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+    <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </install>
-    <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+    <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </uninstall>
-    <depends>WebServiceDeployerJSE</depends>
+    <depends>WebServiceDeployerPreJSE</depends>
   </bean>
   <!-- Phase 2 of JSE JAX-RPC -->
-  <bean name="WSDeployerHook_JAXRPC_JSE2" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
-    <install bean="WebServiceDeployerJSE2" method="addDeployerHook">
+  <bean name="WSDeployerHook_JAXRPC_POST_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+    <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </install>
-    <uninstall bean="WebServiceDeployerJSE2" method="removeDeployerHook">
+    <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </uninstall>
-    <depends>WebServiceDeployerJSE2</depends>
+    <depends>WebServiceDeployerPostJSE</depends>
   </bean>
 
   <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookEJB21">
@@ -135,34 +136,34 @@
   </bean>
 
   <!-- Phase 1 of JSE JAX-WS-->
-  <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE</property>
-    <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+  <bean name="WSDeployerHook_JAXWS_PRE_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+    <install bean="WebServiceDeployerPreJSE" method="addDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </install>
-    <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+    <uninstall bean="WebServiceDeployerPreJSE" method="removeDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </uninstall>
-    <depends>WebServiceDeployerJSE</depends>
+    <depends>WebServiceDeployerPreJSE</depends>
   </bean>
   <!-- Phase 2 of JSE JAX-WS -->
-  <bean name="WSDeployerHook_JAXWS_JSE2" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE2">
-    <property name="deploymentManagerName">WSDeploymentAspectManagerJSE2</property>
-    <install bean="WebServiceDeployerJSE2" method="addDeployerHook">
+  <bean name="WSDeployerHook_JAXWS_POST_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookPostJSE">
+    <property name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+    <install bean="WebServiceDeployerPostJSE" method="addDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </install>
-    <uninstall bean="WebServiceDeployerJSE2" method="removeDeployerHook">
+    <uninstall bean="WebServiceDeployerPostJSE" method="removeDeployerHook">
       <parameter>
         <this/>
       </parameter>
     </uninstall>
-    <depends>WebServiceDeployerJSE2</depends>
+    <depends>WebServiceDeployerPostJSE</depends>
   </bean>
 
   <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookEJB3">
@@ -183,11 +184,12 @@
   <!-- 
     Each DeploymentAspectManger maintains a list of DeploymentAspects
   -->
-  <bean name="WSDeploymentAspectManagerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE</property>
+  <bean name="WSDeploymentAspectManagerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="name">WSDeploymentAspectManagerPreJSE</property>
   </bean>
-  <bean name="WSDeploymentAspectManagerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
-    <property name="name">WSDeploymentAspectManagerJSE2</property>
+  <bean name="WSDeploymentAspectManagerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="parent"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
+    <property name="name">WSDeploymentAspectManagerPostJSE</property>
   </bean>
   <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
     <property name="name">WSDeploymentAspectManagerEJB</property>
@@ -241,10 +243,14 @@
   </bean>
   
   <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeploymentAspect">
-    <property name="requires">ContextProperties</property>
-    <!--property name="requires">ContextProperties, StackDescriptor</property-->
+    <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="WSURLPatternDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
     <property name="requires">ContextRoot, ContainerMetaData</property>
     <property name="provides">URLPattern</property>
@@ -263,11 +269,6 @@
     <property name="securityHandlerEJB3"><inject bean="WSSecurityHandlerEJB3"/></property>
   </bean>
 
-  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss50.RuntimeLoaderDeploymentAspect">
-    <!--property name="requires">ContextProperties</property TODO: link both DAM's-->     
-    <property name="provides">RuntimeLoader</property>
-  </bean>
-  
   <!-- Deployment aspect helper beans -->
   <bean name="WSEndpointMetrics" class="org.jboss.wsf.framework.management.EndpointMetricsImpl"/>
   <bean name="WSSecurityHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityHandlerEJB21"/>
@@ -280,8 +281,8 @@
   <!-- Deployment aspect installers -->
 
   <!-- Phase 1 -->
-  <bean name="WSDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -291,12 +292,11 @@
   </bean>
 
   <!-- Phase 2 -->
-  <bean name="WSDeploymentAspectInstallerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE2"/></property>
+  <bean name="WSDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
         <inject bean="WSContextRootDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
@@ -305,6 +305,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSURLPatternDeploymentAspect"/>
       </set>
     </property>
@@ -315,7 +316,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSContainerMetaDataDeploymentAspect"/>
         <inject bean="WSContextRootDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
@@ -325,6 +325,7 @@
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
         <inject bean="WSURLPatternDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
       </set>
@@ -335,7 +336,6 @@
     <property name="sortAspectsOnCreate">false</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSEndpointAPIDeploymentAspect"/>
         <inject bean="WSEndpointAddressDeploymentAspect"/>
         <inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -343,6 +343,7 @@
         <inject bean="WSEndpointMetricsDeploymentAspect"/>
         <inject bean="WSEndpointNameDeploymentAspect"/>
         <inject bean="WSEndpointRegistryDeploymentAspect"/>
+        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
         <inject bean="WSWebAppDeploymentAspect"/>
         <inject bean="WSWebAppGeneratorDeploymentAspect"/>
       </set>

Modified: container/jboss50/trunk/version.properties
===================================================================
--- container/jboss50/trunk/version.properties	2007-08-08 07:07:32 UTC (rev 4243)
+++ container/jboss50/trunk/version.properties	2007-08-08 09:19:04 UTC (rev 4244)
@@ -5,8 +5,8 @@
 specification.vendor=JBoss (http://www.jboss.org)
 specification.version=jbossws-2.0
 
-version.id=2.0.1.CR2
-repository.id=2.0.1.CR2
+version.id=2.0.1.GA
+repository.id=snapshot
 
 implementation.title=JBoss Web Services - Integration JBoss50 
 implementation.url=http://www.jboss.org/products/jbossws

Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -23,16 +23,16 @@
 
 //$Id$
 
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+
 /**
  * A deployment aspect installer.
  * 
@@ -44,22 +44,11 @@
    // provide logging
    private static final Logger log = Logger.getLogger(DeploymentAspectInstaller.class);
 
-   private DeploymentAspectManager parent;
    private DeploymentAspectManager manager;
    private Set<DeploymentAspect> aspects;
    private boolean sortAspectsOnCreate;
-   private Set<String> parentProvidedConditions = new HashSet<String>();   
+   private Set<String> parentProvidedConditions = new HashSet<String>();
 
-   public DeploymentAspectManager getParent()
-   {
-      return parent;
-   }
-
-   public void setParent(DeploymentAspectManager parent)
-   {
-      this.parent = parent;
-   }
-
    public void setManager(DeploymentAspectManager manager)
    {
       this.manager = manager;
@@ -79,32 +68,32 @@
    {
       List<DeploymentAspect> unsortedAspects = new ArrayList<DeploymentAspect>();
 
-      if(parent!=null)
-      {
-         Iterator<DeploymentAspect> it = parent.getDeploymentAspects().iterator();
-         while(it.hasNext())
-         {
-            DeploymentAspect aspect = it.next();
-            parentProvidedConditions.addAll( aspect.getProvidesAsSet());
-         }
-      }
-
       unsortedAspects.addAll(manager.getDeploymentAspects());
       unsortedAspects.addAll(aspects);
-      
+
       List<DeploymentAspect> sortedAspects = unsortedAspects;
       if (sortAspectsOnCreate)
       {
+         // get the conditions provided by the parent
+         if (manager.getParent() != null)
+         {
+            Iterator<DeploymentAspect> it = manager.getParent().getDeploymentAspects().iterator();
+            while (it.hasNext())
+            {
+               DeploymentAspect aspect = it.next();
+               parentProvidedConditions.addAll(aspect.getProvidesAsSet());
+            }
+         }
+
          sortedAspects = new ArrayList<DeploymentAspect>();
          List<DeploymentAspect> allAspects = new ArrayList<DeploymentAspect>(unsortedAspects);
 
          // Add aspects with no requirements first 
          Iterator<DeploymentAspect> itAll = allAspects.iterator();
-                 
          while (itAll.hasNext())
          {
             DeploymentAspect aspect = itAll.next();
-            if (aspect.getRequires() == null)
+            if (aspect.getRequires() == null || parentProvidedConditions.containsAll(aspect.getRequiresAsSet()))
             {
                sortedAspects.add(aspect);
                itAll.remove();
@@ -160,10 +149,11 @@
       String exmsg = "Cannot add deployment aspect(s)";
       StringBuilder str = new StringBuilder(exmsg);
 
-      if(parent!=null)
-         str.append( "\n"+parent.getName()+  " provides: " + parentProvidedConditions);
-      str.append(    "\n"+manager.getName()+ " provides: " + providedConditions);
+      if (manager.getParent() != null)
+         str.append("\n" + manager.getParent().getName() + " provides: " + parentProvidedConditions);
       
+      str.append("\n" + manager.getName() + " provides: " + providedConditions);
+
       for (DeploymentAspect da : allAspects)
       {
          str.append("\n   " + da.getClass().getName() + ", requires: " + da.getRequires());
@@ -176,18 +166,12 @@
    private int getAspectIndex(List<DeploymentAspect> sortedAspects, DeploymentAspect aspect)
    {
       int index = -1;
-      Set<String> selfProvidedConditions = new HashSet<String>();
+      Set<String> providedConditions = new HashSet<String>(parentProvidedConditions);
       for (int i = 0; i < sortedAspects.size(); i++)
       {
          DeploymentAspect sortedAspect = sortedAspects.get(i);
-         selfProvidedConditions.addAll(sortedAspect.getProvidesAsSet());
-
-         // take both parent and child conditions into consideration 
-         HashSet<String> parentAndChildConditions = new HashSet<String>();
-         parentAndChildConditions.addAll(parentProvidedConditions);
-         parentAndChildConditions.addAll(selfProvidedConditions);
-
-         if (parentAndChildConditions.containsAll(aspect.getRequiresAsSet()))
+         providedConditions.addAll(sortedAspect.getProvidesAsSet());
+         if (providedConditions.containsAll(aspect.getRequiresAsSet()))
          {
             index = i + 1;
             break;

Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -48,6 +48,7 @@
    private static final Logger log = Logger.getLogger(DeploymentAspectManagerImpl.class);
 
    private String name;
+   private DeploymentAspectManager parent;
    private List<DeploymentAspect> sortedAspects = new ArrayList<DeploymentAspect>();
    private long deploymentCount;
 
@@ -61,6 +62,16 @@
       this.name = name;
    }
 
+   public DeploymentAspectManager getParent()
+   {
+      return parent;
+   }
+
+   public void setParent(DeploymentAspectManager parent)
+   {
+      this.parent = parent;
+   }
+
    public List<DeploymentAspect> getDeploymentAspects()
    {
       return Collections.unmodifiableList(sortedAspects);

Modified: framework/trunk/version.properties
===================================================================
--- framework/trunk/version.properties	2007-08-08 07:07:32 UTC (rev 4243)
+++ framework/trunk/version.properties	2007-08-08 09:19:04 UTC (rev 4244)
@@ -5,8 +5,8 @@
 specification.vendor=JBoss (http://www.jboss.org)
 specification.version=jbossws-2.0
 
-version.id=1.0.0.CR2
-repository.id=1.0.0.CR2
+version.id=1.0.0.CR1
+repository.id=1.0.0.CR1
 
 implementation.title=JBoss Web Services - Framework
 implementation.url=http://www.jboss.org/products/jbossws

Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java	2007-08-08 07:07:32 UTC (rev 4243)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java	2007-08-08 09:19:04 UTC (rev 4244)
@@ -36,6 +36,12 @@
    /** Get the name for this aspect manager */
    String getName();
    
+   /** Get the optional parent for this manager */
+   DeploymentAspectManager getParent();
+   
+   /** Set the optional parent for this manager */
+   void setParent(DeploymentAspectManager dam);
+   
    /** Get the ordered list of registered deployment aspects */
    List<DeploymentAspect> getDeploymentAspects();
    

Modified: stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml
===================================================================
--- stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ stack/cxf/trunk/src/main/resources/jbossws-xfire-config.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -54,8 +54,8 @@
   </bean>
 
   <!-- Deployment aspect installers -->  
-  <bean name="WSCXFDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSCXFDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">true</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -64,7 +64,7 @@
         <inject bean="WSCXFDescriptorDeploymentAspect"/>
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE</depends>
+    <depends>WSDeploymentAspectInstallerPreJSE</depends>
   </bean>
   <bean name="WSCXFDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
     <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>

Modified: stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ stack/metro/trunk/src/main/resources/jbossws-sunri-config.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -74,8 +74,8 @@
   </bean>
   
   <!-- Deployment aspect installers -->  
-  <bean name="WSMetroDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSMetroDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">true</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
@@ -84,7 +84,7 @@
         <inject bean="WSMetroDescriptorDeploymentAspect"/>
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE</depends>
+    <depends>WSDeploymentAspectInstallerPreJSE</depends>
   </bean>
   <bean name="WSMetroDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
     <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>

Modified: stack/native/trunk/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/trunk/src/main/resources/jbossws-native-config.xml	2007-08-08 07:07:32 UTC (rev 4243)
+++ stack/native/trunk/src/main/resources/jbossws-native-config.xml	2007-08-08 09:19:04 UTC (rev 4244)
@@ -38,7 +38,7 @@
     The stack specific deployment aspects
   --> 
   <bean name="WSNativeContextPropertiesDeploymentAspect" class="org.jboss.wsf.framework.deployment.ContextPropertiesDeploymentAspect">
-    <property name="provides">ContextProperties</property>
+    <property name="provides">ContextProperties, StackDescriptor</property>
     <property name="contextProperties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
         <entry><key>org.jboss.ws.webapp.ServletClass</key><value>org.jboss.wsf.stack.jbws.EndpointServlet</value></entry>
@@ -76,20 +76,19 @@
   
   <!-- Deployment aspect installers -->
   <!-- Phase 1 -->
-  <bean name="WSNativeDeploymentAspectInstallerJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+  <bean name="WSNativeDeploymentAspectInstallerPreJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPreJSE"/></property>
     <property name="sortAspectsOnCreate">true</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
         <inject bean="WSNativeContextPropertiesDeploymentAspect"/>
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE</depends>
+    <depends>WSDeploymentAspectInstallerPreJSE</depends>
   </bean>
   <!-- Phase 2 -->
-   <bean name="WSNativeDeploymentAspectInstallerJSE2" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
-    <property name="parent"><inject bean="WSDeploymentAspectManagerJSE"/></property>
-    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE2"/></property>
+  <bean name="WSNativeDeploymentAspectInstallerPostJSE" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerPostJSE"/></property>
     <property name="sortAspectsOnCreate">true</property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">        
@@ -101,7 +100,7 @@
         <inject bean="WSNativeEagerInitializeDeploymentAspect"/>
       </set>
     </property>
-    <depends>WSDeploymentAspectInstallerJSE2</depends>
+    <depends>WSDeploymentAspectInstallerPostJSE</depends>
   </bean>
 
   <bean name="WSNativeDeploymentAspectInstallerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">

Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties	2007-08-08 07:07:32 UTC (rev 4243)
+++ stack/native/trunk/version.properties	2007-08-08 09:19:04 UTC (rev 4244)
@@ -26,11 +26,11 @@
 
 # Dependend integration projects 
 jbossws-common=1.0.0.CR1
-jbossws-framework=1.0.0.CR2
+jbossws-framework=1.0.0.CR1
 jbossws-spi=1.0.0.CR1
-jbossws-jboss50=2.0.1.CR1
-jbossws-jboss42=2.0.1.CR1
-jbossws-jboss40=2.0.1.CR1
+jbossws-jboss40=snapshot
+jbossws-jboss42=snapshot
+jbossws-jboss50=snapshot
 
 # JBossAS-5.0
 jboss-jbossxb-jboss50=2.0.0.CR2




More information about the jbossws-commits mailing list