[jbossws-commits] JBossWS SVN: r10295 - in container/jboss50/branches/ropalka-jboss510/src/main: java/org/jboss/wsf/container/jboss50/deployment and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Jul 2 14:26:18 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-07-02 14:26:18 -0400 (Thu, 02 Jul 2009)
New Revision: 10295

Removed:
   container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
Modified:
   container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentAspectDeployer.java
   container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentDeployer.java
   container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-2332][JBWS-2382] refactoring

Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentAspectDeployer.java	2009-07-02 15:16:43 UTC (rev 10294)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentAspectDeployer.java	2009-07-02 18:26:18 UTC (rev 10295)
@@ -41,6 +41,8 @@
 
    /** JBossWS specific inputs/outputs prefix. */
    private static final String JBOSSWS_ATTACHMENT_PREFIX = "jbossws.";
+   /** JBossWS specific metadata. */
+   private static final String JBOSSWS_METADATA = WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + "metadata";
    /** Delegee. */
    private final DeploymentAspect aspect;
 
@@ -51,13 +53,25 @@
     */
    public WSDeploymentAspectDeployer( final DeploymentAspect aspect )
    {
+      this( aspect, false );
+   }
+   /**
+    * Constructor.
+    * 
+    * @param aspect deployment aspect
+    * @param lastAspect if this is the last JBossWS aspect in deployers chain
+    */
+   public WSDeploymentAspectDeployer( final DeploymentAspect aspect, final boolean lastAspect )
+   {
       super();
-
-      this.aspect = aspect;
       
       // inputs
       this.addInput( JBossWebMetaData.class );
       this.addInput( Deployment.class );
+      if ( lastAspect )
+      {
+         this.addInput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+      }
       
       // propagate DA requirements and map them to deployer inputs
       final Set< String > inputs = aspect.getRequiresAsSet();
@@ -68,6 +82,10 @@
       
       // outputs
       this.addOutput( JBossWebMetaData.class );
+      if ( !lastAspect )
+      {
+         this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+      }
 
       // propagate DA provides and map them to deployer outputs
       final Set< String > outputs = aspect.getProvidesAsSet();
@@ -75,6 +93,8 @@
       {
          this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output );
       }
+
+      this.aspect = aspect;
    }
 
    /**

Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentDeployer.java	2009-07-02 15:16:43 UTC (rev 10294)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WSDeploymentDeployer.java	2009-07-02 18:26:18 UTC (rev 10295)
@@ -111,9 +111,6 @@
    private void newJaxrpcEjbDeployment( final DeploymentUnit unit )
    {
       ArchiveDeployment dep = newDeployment(unit);
-      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
-      dep.setRuntimeClassLoader(unit.getClassLoader());
-      dep.setType(unit.getAttachment( DeploymentType.class ));
 
       Service service = dep.getService();
 
@@ -162,9 +159,6 @@
    private void newJaxwsEjbDeployment( final DeploymentUnit unit )
    {
       ArchiveDeployment dep = newDeployment(unit);
-      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
-      dep.setRuntimeClassLoader(unit.getClassLoader());
-      dep.setType(unit.getAttachment( DeploymentType.class ));
 
       Service service = dep.getService();
 
@@ -204,9 +198,6 @@
    private void newJaxrpcPojoDeployment( final DeploymentUnit unit )
    {
       ArchiveDeployment dep = newDeployment(unit);
-      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
-      dep.setRuntimeClassLoader(null); 
-      dep.setType(unit.getAttachment( DeploymentType.class ));
 
       Service service = dep.getService();
 
@@ -247,8 +238,6 @@
    private void newJaxwsPojoDeployment( final DeploymentUnit unit )
    {
       ArchiveDeployment dep = newDeployment(unit);
-      dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));     
-      dep.setType(unit.getAttachment( DeploymentType.class ));
 
       Service service = dep.getService();
 
@@ -311,6 +300,11 @@
             ArchiveDeployment parentDep = (ArchiveDeployment)this.deploymentModelFactory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
             dep.setParent(parentDep);
          }
+
+         dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+         dep.setRuntimeClassLoader(unit.getClassLoader());
+         dep.setType(unit.getAttachment( DeploymentType.class ));
+         
          return dep;
       }
       catch (Exception ex)

Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java	2009-07-02 15:16:43 UTC (rev 10294)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java	2009-07-02 18:26:18 UTC (rev 10295)
@@ -1,41 +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.container.jboss50.deployment;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-
-/**
- * Determines the correct runtime loader and makes it available through the {@link Deployment}.
- *
- * @author Heiko.Braun at jboss.com
- * @author <a href="ropalka at redhat.com">Richard Opalka</a>
- */
-public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
-{
-
-   public void create( final Deployment dep )
-   {
-      dep.setRuntimeClassLoader( dep.getInitialClassLoader() );
-   }
-
-}

Modified: container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/stack-agnostic-jboss-beans.xml	2009-07-02 15:16:43 UTC (rev 10294)
+++ container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/stack-agnostic-jboss-beans.xml	2009-07-02 18:26:18 UTC (rev 10295)
@@ -125,12 +125,6 @@
   </bean>
 
   <bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
-    <property name="requires">
-      ContainerMetaData, ContextProperties, ContextRoot, EndpointAddress,
-      EndpointMetrics, EndpointName, EndpointRecordProcessors, InjectionMetaData,
-      RegisteredEndpoint, RuntimeLoader, URLPattern, StackEndpointHandler,
-      StackDescriptor, VirtualHosts, VFSRoot, WebMetaData, StackSpecificMetaData
-    </property>
     <property name="provides">LifecycleHandler</property>
   </bean>
 
@@ -139,6 +133,7 @@
       <parameter>
         <inject bean="WSEndpointLifecycleDeploymentAspect"/>
       </parameter>
+      <parameter>true</parameter>
     </constructor>
     <property name="relativeOrder">37</property> <!-- [JBDEPLOY-201] workaround -->
   </bean>
@@ -184,20 +179,6 @@
     <property name="relativeOrder">35</property> <!-- [JBDEPLOY-201] workaround -->
   </bean>
 
-  <bean name="WSRuntimeLoaderDeploymentAspect" class="org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect">
-    <property name="requires">ContainerMetaData</property>
-    <property name="provides">RuntimeLoader</property>
-  </bean>
-
-  <bean name="WSRuntimeLoaderDeployer" class="org.jboss.wsf.container.jboss50.deployer.WSDeploymentAspectDeployer">
-    <constructor>
-      <parameter>
-        <inject bean="WSRuntimeLoaderDeploymentAspect"/>
-      </parameter>
-    </constructor>
-    <property name="relativeOrder">19</property> <!-- [JBDEPLOY-201] workaround -->
-  </bean>
-
   <bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
     <property name="requires">ContextRoot, ContainerMetaData</property>
     <property name="provides">URLPattern</property>




More information about the jbossws-commits mailing list