[jboss-cvs] JBossAS SVN: r69369 - trunk/server/src/main/org/jboss/web/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 26 13:51:41 EST 2008


Author: bstansberry at jboss.com
Date: 2008-01-26 13:51:41 -0500 (Sat, 26 Jan 2008)
New Revision: 69369

Modified:
   trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
Log:
Some docs and comments to help demystify this how this works.

Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java	2008-01-26 11:45:26 UTC (rev 69368)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java	2008-01-26 18:51:41 UTC (rev 69369)
@@ -626,8 +626,10 @@
    }
 
    /**
-    * Called by deploy to create a ServiceMetaData instance that wraps the
-    * AbstractWarDeployment bean.
+    * Called by deploy first to create a ServiceMetaData instance that wraps the
+    * AbstractWarDeployment bean and then attach it to the deployment unit. The
+    * presence of the ServiceMetaData attachment makes the deployment unit
+    * "relevant" to the deployers that handle mbean services.
     * 
     * @param unit - the deployment unit
     * @param metaData - the web app metadata passed to deploy
@@ -667,6 +669,12 @@
          }
          webModule.setDependencies(dependencies);  
 
+         // Here's where a bit of magic happens. By attaching the ServiceMetaData
+         // to the deployment, we now make the deployment "relevant" to
+         // deployers that use ServiceMetaData as an input (e.g. the
+         // org.jboss.system.deployers.ServiceDeployer).  Those deployers
+         // can now take over deploying the web module.
+         
          // TODO could create multiple components for the deployment
          // The ServiceConstructorMetaData is not serializable due to its args
          unit.addAttachment(ServiceMetaData.class, webModule);




More information about the jboss-cvs-commits mailing list