[jbossws-commits] JBossWS SVN: r4030 - in trunk/integration: jboss42/src/main/java/org/jboss/wsf/container/jboss42 and 7 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Jul 30 16:02:31 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-07-30 16:02:30 -0400 (Mon, 30 Jul 2007)
New Revision: 4030

Added:
   trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentAspectManagerFactory.java
Removed:
   trunk/integration/jboss40/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
   trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
   trunk/integration/jboss42/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
   trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
   trunk/integration/jboss50/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
Modified:
   trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectHttpServer.java
   trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
   trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
   trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
Log:
Add DefaultDeploymentAspectManagerFactory

Deleted: trunk/integration/jboss40/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
===================================================================
--- trunk/integration/jboss40/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss40/src/main/resources/jbossws-jboss40.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 20:02:30 UTC (rev 4030)
@@ -1 +0,0 @@
-org.jboss.wsf.container.jboss42.DeploymentAspectManagerFactoryImpl
\ No newline at end of file

Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectHttpServer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectHttpServer.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectHttpServer.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -32,7 +32,9 @@
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
 import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
 import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
 import org.jboss.wsf.spi.http.HttpContext;
 import org.jboss.wsf.spi.http.HttpContextFactory;
 import org.jboss.wsf.spi.http.HttpServer;
@@ -67,11 +69,16 @@
 
       try
       {
+         // Create the deployment
          SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
-         DeploymentModelFactory depFactory = spiProvider.getSPI(DeploymentModelFactory.class);
-         Deployment dep = depFactory.newDeployment("jaxws-endpoint-deployment", implClass.getClassLoader());
-         dep.getService().addEndpoint(depFactory.newEndpoint(implClass.getName()));
+         DeploymentModelFactory depModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+         Deployment dep = depModelFactory.newDeployment("endpoint-deployment", implClass.getClassLoader());
+         dep.getService().addEndpoint(depModelFactory.newEndpoint(implClass.getName()));
          
+         // Deploy using deployment aspects
+         DeploymentAspectManagerFactory depManagerFactory = spiProvider.getSPI(DeploymentAspectManagerFactory.class);
+         depManagerFactory.getDeploymentAspectManager(DeploymentType.JAXWS_JSE);
+         
       }
       catch (RuntimeException rte)
       {

Deleted: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentAspectManagerFactoryImpl.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-import org.jboss.logging.Logger;
-
-/**
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 23, 2007
- */
-public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
-{
-   private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
-
-   public DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType)
-   {
-      String beanName;
-
-      if(deploymentType.toString().indexOf("EJB")!=-1)
-         beanName = "WSDeploymentAspectManagerEJB";
-      else
-         beanName = "WSDeploymentAspectManagerJSE";
-
-      log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
-
-      return new KernelAwareSPIFactory().getKernelProvidedSPI(
-        beanName, DeploymentAspectManager.class
-      );
-   }
-}

Modified: trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml	2007-07-30 20:02:30 UTC (rev 4030)
@@ -85,6 +85,9 @@
   <bean name="WSDeploymentAspectManagerEJB" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
     <property name="name">WSDeploymentAspectManagerEJB</property>
   </bean>
+  <bean name="WSDeploymentAspectManagerEndpointAPI" class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+    <property name="name">WSDeploymentAspectManagerEndpointAPI</property>
+  </bean>
   
   <!-- 
     The container deployment aspects
@@ -201,3 +204,10 @@
       </set>
     </property>
   </bean>
+  <bean name="WSDeploymentAspectInstallerEndpointAPI" class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerEndpointAPI"/></property>
+    <property name="aspects">
+      <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+      </set>
+    </property>
+  </bean>

Deleted: trunk/integration/jboss42/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 20:02:30 UTC (rev 4030)
@@ -1 +0,0 @@
-org.jboss.wsf.container.jboss42.DeploymentAspectManagerFactoryImpl
\ No newline at end of file

Deleted: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentAspectManagerFactoryImpl.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -1,58 +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.DeploymentAspectManagerFactory;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-import org.jboss.logging.Logger;
-
-/**
- * A DeploymentAspectManagerFactory that retrieves a configured
- * {@link DeploymentAspectManager} from MC kernel.
- *
- * @see org.jboss.wsf.framework.deployment.DeploymentAspectInstaller
- *
- * @author Heiko.Braun at jboss.com
- *         Created: Jul 20, 2007
- */
-public class DeploymentAspectManagerFactoryImpl extends DeploymentAspectManagerFactory
-{
-   private static final Logger log = Logger.getLogger(DeploymentAspectManagerFactoryImpl.class);
-
-   public DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType)
-   {
-      String beanName;
-
-      if(deploymentType.toString().indexOf("EJB")!=-1)
-         beanName = "WSDeploymentAspectManagerEJB";
-      else
-         beanName = "WSDeploymentAspectManagerJSE";
-
-      log.debug("DeploymentAspectManager for " + deploymentType +": " +beanName);
-
-      return new KernelAwareSPIFactory().getKernelProvidedSPI(
-        beanName, DeploymentAspectManager.class
-      );
-   }
-}

Deleted: trunk/integration/jboss50/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory
===================================================================
--- trunk/integration/jboss50/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/jboss50/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory	2007-07-30 20:02:30 UTC (rev 4030)
@@ -1 +0,0 @@
-org.jboss.wsf.container.jboss50.DeploymentAspectManagerFactoryImpl
\ No newline at end of file

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -23,6 +23,7 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.wsf.common.ServiceLoader;
+import org.jboss.wsf.framework.deployment.DefaultDeploymentAspectManagerFactory;
 import org.jboss.wsf.framework.deployment.DefaultDeploymentModelFactory;
 import org.jboss.wsf.framework.deployment.DefaultLifecycleHandlerFactory;
 import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
@@ -73,6 +74,10 @@
 
          // SPI provided by framework, default that can be overridden
 
+         if (DeploymentAspectManagerFactory.class.equals(spiType))
+         {
+            returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
+         }
          if (DeploymentModelFactory.class.equals(spiType))
          {
             returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
@@ -96,10 +101,6 @@
 
          // SPI provided by either container or stack integration
 
-         else if (DeploymentAspectManagerFactory.class.equals(spiType))
-         {
-            returnType = (T)loadService(spiType, null);
-         }
          else if (EndpointRegistryFactory.class.equals(spiType))
          {
             returnType = (T)loadService(spiType, null);

Added: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentAspectManagerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentAspectManagerFactory.java	                        (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DefaultDeploymentAspectManagerFactory.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -0,0 +1,63 @@
+/*
+ * 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.framework.deployment;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.KernelAwareSPIFactory;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+
+/**
+ * A DeploymentAspectManagerFactory that retrieves a configured
+ * {@link DeploymentAspectManager} from MC kernel.
+ *
+ * @see org.jboss.wsf.framework.deployment.DeploymentAspectInstaller
+ *
+ * @author Heiko.Braun at jboss.com
+ *         Created: Jul 20, 2007
+ */
+public class DefaultDeploymentAspectManagerFactory extends DeploymentAspectManagerFactory
+{
+   private static final Logger log = Logger.getLogger(DefaultDeploymentAspectManagerFactory.class);
+
+   public DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType)
+   {
+      String beanName;
+
+      if (deploymentType.toString().indexOf("EJB") != -1)
+      {
+         beanName = "WSDeploymentAspectManagerEJB";
+      }
+      else
+      {
+         beanName = "WSDeploymentAspectManagerJSE";
+      }
+      return getDeploymentAspectManager(beanName);
+   }
+
+   public DeploymentAspectManager getDeploymentAspectManager(String beanName)
+   {
+      log.debug("DeploymentAspectManager for: " + beanName);
+      return new KernelAwareSPIFactory().getKernelProvidedSPI(beanName, DeploymentAspectManager.class);
+   }
+}

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -63,6 +63,7 @@
 
    public List<DeploymentAspect> getDeploymentAspects()
    {
+      // This cannot be done in 'create' because we add aspects from different MC configurations
       if (sortedAspects == null)
       {
          sortedAspects = new ArrayList<DeploymentAspect>();

Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java	2007-07-30 18:17:57 UTC (rev 4029)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java	2007-07-30 20:02:30 UTC (rev 4030)
@@ -32,4 +32,6 @@
 public abstract class DeploymentAspectManagerFactory implements SPIView
 {
    public abstract DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType);
+   
+   public abstract DeploymentAspectManager getDeploymentAspectManager(String deploymentType);
 }




More information about the jbossws-commits mailing list