[jbossws-commits] JBossWS SVN: r8569 - in framework/branches/ropalka/src: main/java/org/jboss/wsf/framework and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Oct 27 16:22:58 EDT 2008


Author: richard.opalka at jboss.com
Date: 2008-10-27 16:22:58 -0400 (Mon, 27 Oct 2008)
New Revision: 8569

Removed:
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/transport/
   framework/branches/ropalka/src/test/
Modified:
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
   framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
Log:
[JBWS-2338] switch to new SPI and COMMON interfaces

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -28,15 +28,12 @@
 import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
 import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
 import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
-import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
 import org.jboss.wsf.framework.management.ServerConfigFactoryImpl;
+import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
 import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
 import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
-import org.jboss.wsf.framework.transport.DefaultTransportManagerFactory;
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
 import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
 import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
 import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
@@ -112,18 +109,10 @@
       {
          returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
       }
-      else if (TransportManagerFactory.class.equals(spiType))
-      {
-         returnType = (T)loadService(spiType, DefaultTransportManagerFactory.class.getName());                  
-      }
       else if (ServerConfigFactory.class.equals(spiType))
       {
          returnType = (T)loadService(spiType, ServerConfigFactoryImpl.class.getName());
       }
-      else if (WSFRuntimeLocator.class.equals(spiType))
-      {
-         returnType = (T)loadService(spiType, DefaultWSFRuntimeLocator.class.getName());
-      }
 
       // SPI provided by either container or stack integration
 
@@ -143,7 +132,6 @@
       {
          returnType = (T)loadService(spiType, null);
       }
-     
       else if (ServiceRefBinderFactory.class.equals(spiType))
       {
          returnType = (T)loadService(spiType, null);

Deleted: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework;
-
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class DefaultWSFRuntimeLocator implements WSFRuntimeLocator
-{
-
-   public WSFRuntime locateRuntime(String runtimeName)
-   {
-      return new KernelAwareSPIFactory().getKernelProvidedSPI(
-        runtimeName, WSFRuntime.class
-      );
-   }
-}

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -23,12 +23,10 @@
 
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.WSFRuntime;
 
 import java.util.Iterator;
 import java.util.Map;
 
-
 /**
  * Populate deployment context properties
  *
@@ -51,7 +49,7 @@
    }
 
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       if (contextProperties != null)
       {

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -28,7 +28,6 @@
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
  * A deployer that assigns the context root to the service 
@@ -39,7 +38,7 @@
 public class ContextRootDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       String contextRoot = dep.getService().getContextRoot();
       if (contextRoot == null)

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -33,16 +33,11 @@
 import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
 import org.jboss.wsf.spi.deployment.WSFDeploymentException;
 import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
- * Process an ordered chain of {@link org.jboss.wsf.spi.deployment.DeploymentAspect}'s
- * on a {@link org.jboss.wsf.spi.deployment.DeploymentLifecycle}
+ * A general service deployment manger.
  * 
  * @author Thomas.Diesler at jboss.com
- * @author Heiko.Braun at jboss.com
- * 
- * @since 20-Apr-2007 
  */
 public class DeploymentAspectManagerImpl implements DeploymentAspectManager
 {
@@ -86,19 +81,18 @@
       // Debug the aspect list
       StringBuilder builder = new StringBuilder("setDeploymentAspects on " + name);
       for (DeploymentAspect aspect : aspects)
-         builder.append("\n  ")
-           .append(aspect.getClass().getName())
-           .append(" provides: ")
-           .append(aspect.getProvidesAsSet())
-           .append(" requires: ")
-           .append(aspect.getRequiresAsSet()
-           );
+         builder.append("\n  " + aspect.getClass().getName() + " provides: " + aspect.getProvidesAsSet() + " requires: " + aspect.getRequiresAsSet());
 
       log.debug(builder);
    }
 
-
-   public void create(Deployment dep, WSFRuntime runtime)
+   /**
+    * Iterate over the registered deployers calls create on each.
+    * Iterate over the registered deployers again and calls start on each.
+    * If start fails it automaticall calls destroy in the reverse order 
+    * starting with the deployer that failed
+    */
+   public void deploy(Deployment dep)
    {
       // create the deployment
       Set<String> providedConditions = new HashSet<String>();
@@ -106,34 +100,25 @@
       {
          DeploymentAspect aspect = getDeploymentAspects().get(i);
 
-         // Check that all required aspects are met
+         // Check that all required aspects are met 
          /*
           TODO: This should done by adding all provided conditions to the Deployment
           when being executed. Otherwise we will miss the parent provided conditions here
-
+          
           Set<String> requiredSet = aspect.getRequiresAsSet();
           requiredSet.remove(DeploymentAspect.LAST_DEPLOYMENT_ASPECT);
           if (providedConditions.containsAll(requiredSet) == false)
           throw new IllegalStateException("Required conditions '" + aspect.getRequires() + "' not satisfied by '" + providedConditions + "' for: " + aspect);
           */
 
-         logInvocation(aspect, "Create");         
-         aspect.create(dep, runtime);
+         logInvocation(aspect, "Create");
+         aspect.create(dep);
 
          providedConditions.addAll(aspect.getProvidesAsSet());
       }
 
       dep.setState(DeploymentState.CREATED);
-   }
 
-   /**
-    * Iterate over the registered deployers calls create on each.
-    * Iterate over the registered deployers again and calls start on each.
-    * If start fails it automaticall calls destroy in the reverse order 
-    * starting with the deployer that failed
-    */
-   public void start(Deployment dep, WSFRuntime runtime)
-   {
       // start the deployment
       for (int i = 0; i < getDeploymentAspects().size(); i++)
       {
@@ -141,14 +126,14 @@
          try
          {
             logInvocation(aspect, "Start");
-            aspect.start(dep, runtime);
+            aspect.start(dep);
          }
          catch (RuntimeException rte)
          {
             while (i-- >= 0)
             {
                // destroy the deployment
-               failsafeDestroy(aspect, dep, runtime);
+               failsafeDestroy(aspect, dep);
             }
             throw rte;
          }
@@ -157,37 +142,33 @@
       dep.setState(DeploymentState.STARTED);
    }
 
-   public void stop(Deployment dep, WSFRuntime runtime)
+   public void undeploy(Deployment dep)
    {
       // stop the deployment
       for (int i = getDeploymentAspects().size(); 0 < i; i--)
       {
          DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
-         failsafeStop(aspect, dep, runtime);
+         failsafeStop(aspect, dep);
       }
 
       dep.setState(DeploymentState.STOPPED);
-   }
 
-
-   public void destroy(Deployment dep, WSFRuntime runtime)
-   {
       // destroy the deployment
       for (int i = getDeploymentAspects().size(); 0 < i; i--)
       {
          DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
-         failsafeDestroy(aspect, dep, runtime);
+         failsafeDestroy(aspect, dep);
       }
 
       dep.setState(DeploymentState.DESTROYED);
    }
 
-   private void failsafeStop(DeploymentAspect aspect, Deployment dep, WSFRuntime runtime)
+   private void failsafeStop(DeploymentAspect aspect, Deployment dep)
    {
       try
       {
          logInvocation(aspect, "Stop");
-         aspect.stop(dep, runtime);
+         aspect.stop(dep);
       }
       catch (RuntimeException rte)
       {
@@ -195,12 +176,12 @@
       }
    }
 
-   private void failsafeDestroy(DeploymentAspect aspect, Deployment dep, WSFRuntime runtime)
+   private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
    {
       try
       {
          logInvocation(aspect, "Destroy");
-         aspect.destroy(dep, runtime);
+         aspect.destroy(dep);
       }
       catch (RuntimeException rte)
       {
@@ -214,9 +195,4 @@
       name = name.substring(name.lastIndexOf(".") + 1);
       log.debug(name + ":" + method);
    }
-
-   public String toString()
-   {
-      return this.name + " :" + super.toString();
-   }
 }

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -28,7 +28,6 @@
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
 import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
  * A deployment aspect for JAXWS Endpoint API endpoints. 
@@ -39,7 +38,7 @@
 public class EndpointAPIDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       dep.setType(DeploymentType.JAXWS_JSE);
 

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -23,7 +23,6 @@
 
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
@@ -39,7 +38,7 @@
 public class EndpointAddressDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       String contextRoot = dep.getService().getContextRoot();
       if (contextRoot == null)

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -21,7 +21,6 @@
  */
 package org.jboss.wsf.framework.deployment;
 
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.deployment.Deployment;
 
 /**
@@ -31,13 +30,13 @@
 public class EndpointDeployerLifecycleDeploymentAspect extends EndpointLifecycleDeploymentAspect
 {
    @Override
-   public void start(Deployment dep, WSFRuntime runtime)
+   public void start(Deployment dep)
    {
       // do nothing in deployers
    }
 
    @Override
-   public void stop(Deployment dep, WSFRuntime runtime)
+   public void stop(Deployment dep)
    {
       // do nothing in deployers
    }

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -23,7 +23,6 @@
 
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Endpoint;
@@ -55,7 +54,7 @@
    }
 
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -22,7 +22,6 @@
 package org.jboss.wsf.framework.deployment;
 
 import org.jboss.wsf.spi.deployment.*;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
  * A deployer that that calls the endpoint lifecycle handler 
@@ -33,7 +32,7 @@
 public class EndpointLifecycleDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {
@@ -42,7 +41,7 @@
    }
 
    @Override
-   public void start(Deployment dep, WSFRuntime runtime)
+   public void start(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {
@@ -51,7 +50,7 @@
    }
 
    @Override
-   public void stop(Deployment dep, WSFRuntime runtime)
+   public void stop(Deployment dep)
    {
       Service service = dep.getService();
       if (service != null)
@@ -66,7 +65,7 @@
    }
 
    @Override
-   public void destroy(Deployment dep, WSFRuntime runtime)
+   public void destroy(Deployment dep)
    {
       Service service = dep.getService();
       if (service != null)

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -23,7 +23,6 @@
 
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.management.EndpointMetrics;
 import org.jboss.wsf.spi.management.EndpointMetricsFactory;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -39,7 +38,7 @@
 public class EndpointMetricsDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
       EndpointMetricsFactory factory = provider.getSPI(EndpointMetricsFactory.class);

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -27,7 +27,6 @@
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.common.ObjectNameFactory;
 
 /**
@@ -39,7 +38,7 @@
 public class EndpointNameDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       String contextRoot = dep.getService().getContextRoot();
       if (contextRoot == null || contextRoot.startsWith("/") == false)

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -33,7 +33,6 @@
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.management.recording.RecordProcessor;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
  * A deployer that sets the record processors for each endpoint
@@ -52,7 +51,7 @@
    }
 
    @Override
-   public void start(Deployment dep, WSFRuntime runtime)
+   public void start(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {
@@ -78,7 +77,7 @@
    }
 
    @Override
-   public void destroy(Deployment dep, WSFRuntime runtime)
+   public void destroy(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -21,32 +21,42 @@
  */
 package org.jboss.wsf.framework.deployment;
 
-import org.jboss.wsf.spi.WSFRuntime;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
 
 /**
  * A deployer that registers the endpoints 
  * 
  * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007 
  */
 public class EndpointRegistryDeploymentAspect extends DeploymentAspect
 {
-   public void create(Deployment dep, WSFRuntime runtime)
-   {     
+   private EndpointRegistry registry;
+   
+   public void create(Deployment dep)
+   {
+      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      if (registry == null)
+         registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
       for (Endpoint ep : dep.getService().getEndpoints())
       {
-         runtime.getEndpointRegistry().register(ep);
+         registry.register(ep);
       }
    }
 
-   public void destroy(Deployment dep, WSFRuntime runtime)
+   public void destroy(Deployment dep)
    {
+      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      if (registry == null)
+         registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
       for (Endpoint ep : dep.getService().getEndpoints())
       {
-         runtime.getEndpointRegistry().unregister(ep);
+         registry.unregister(ep);
       }
    }
 }

Deleted: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.deployment;
-
-import org.jboss.wsf.spi.ComposableRuntime;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.*;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Invokes a HTTP {@link org.jboss.wsf.spi.transport.TransportManager} 
- *
- * @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.com
- * 
- * @since 19-May-2007
- */
-public class HttpTransportDeploymentAspect extends DeploymentAspect
-{
-   @Override
-   public void create(Deployment dep, WSFRuntime runtime)
-   {
-      TransportManagerFactory tmf = ((ComposableRuntime)runtime).getTransportManagerFactory();
-      TransportManager httpTransport = tmf.createTransportManager(Protocol.HTTP);
-
-      // Context root
-      String contextRoot = dep.getService().getContextRoot();
-      if (contextRoot == null)
-         throw new IllegalStateException("Cannot obtain context root");
-
-      // Setup transport for each endpoint
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         String urlPattern = ep.getURLPattern();
-         if (urlPattern == null)
-            throw new IllegalStateException("Cannot obtain url pattern");
-         if (urlPattern.endsWith("/*"))
-            urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
-
-         HttpSpec spec = new HttpSpec(contextRoot, urlPattern);
-
-         // Propagate stack provided properties through TransportSpec (ServletClass and InitParameter)
-         String servletClass = (String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
-         if (servletClass == null) throw new IllegalStateException("Cannot obtain context property: " + HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
-
-         Object ctxProps = dep.getProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
-         Map ctxParams = ctxProps != null ?  (Map)ctxProps:new HashMap();
-
-         spec.setServletClass(servletClass);
-         spec.getContextParameter().putAll(ctxParams);
-         
-         ListenerRef ref = httpTransport.createListener(ep, spec);
-         ep.addAttachment(ListenerRef.class, ref);
-         ep.setAddress(ref.getAddress().toString());
-      }
-   }
-   
-   @Override
-   public void destroy(Deployment dep, WSFRuntime runtime)
-   {
-      TransportManagerFactory tmf = ((ComposableRuntime)runtime).getTransportManagerFactory();
-      TransportManager httpTransport = tmf.createTransportManager(Protocol.HTTP);
-
-      for (Endpoint ep : dep.getService().getEndpoints())
-      {
-         ListenerRef listenerRef = ep.getAttachment(ListenerRef.class);
-         httpTransport.destroyListener(listenerRef);
-      }
-   }
-   
-}

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -21,7 +21,6 @@
  */
 package org.jboss.wsf.framework.deployment;
 
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 
@@ -35,25 +34,25 @@
 {
 
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       // does nothing
    }
 
    @Override
-   public void destroy(Deployment dep, WSFRuntime runtime)
+   public void destroy(Deployment dep)
    {
       // does nothing
    }
 
    @Override
-   public void start(Deployment dep, WSFRuntime runtime)
+   public void start(Deployment dep)
    {
       // does nothing
    }
 
    @Override
-   public void stop(Deployment dep, WSFRuntime runtime)
+   public void stop(Deployment dep)
    {
       // does nothing
    }

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -28,7 +28,6 @@
 import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
 
 /**
  * A deployer that assigns the URLPattern to endpoints. 
@@ -39,7 +38,7 @@
 public class URLPatternDeploymentAspect extends DeploymentAspect
 {
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       for (Endpoint ep : dep.getService().getEndpoints())
       {

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -24,7 +24,6 @@
 
 import java.util.Arrays;
 
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -40,7 +39,7 @@
 {
 
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       String[] virtualHosts = dep.getService().getVirtualHosts();
       if (virtualHosts == null)

Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java	2008-10-27 19:38:59 UTC (rev 8568)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java	2008-10-27 20:22:58 UTC (rev 8569)
@@ -34,7 +34,6 @@
 import org.dom4j.io.XMLWriter;
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.jboss.wsf.spi.deployment.ArchiveDeployment;
 import org.jboss.wsf.spi.deployment.Deployment;
@@ -70,7 +69,7 @@
    }
 
    @Override
-   public void create(Deployment dep, WSFRuntime runtime)
+   public void create(Deployment dep)
    {
       String typeStr = dep.getType().toString();
       if (typeStr.endsWith("EJB21"))




More information about the jbossws-commits mailing list