[jboss-cvs] JBossAS SVN: r59877 - trunk/deployment/src/main/org/jboss/deployment/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 20 10:15:31 EST 2007


Author: scott.stark at jboss.org
Date: 2007-01-20 10:15:30 -0500 (Sat, 20 Jan 2007)
New Revision: 59877

Modified:
   trunk/deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java
Log:
Update DeploymentManager for ee 5

Modified: trunk/deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java
===================================================================
--- trunk/deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java	2007-01-20 14:28:48 UTC (rev 59876)
+++ trunk/deployment/src/main/org/jboss/deployment/spi/DeploymentManagerImpl.java	2007-01-20 15:15:30 UTC (rev 59877)
@@ -356,6 +356,31 @@
     */
    public ProgressObject distribute(Target[] targets, InputStream moduleArchive, InputStream deploymentPlan)
    {
+      return doDistribute(targets, null, moduleArchive, deploymentPlan);
+   }
+
+   /**
+    * The distribute method performs three tasks; it validates the deployment configuration
+    * data, generates all container specific classes and interfaces, and moves the fully
+    * baked archive to the designated deployment targets.
+    * 
+    * @param targets        the targets
+    * @param moduleArchive  the module archive
+    * @param deploymentPlan the runtime configuration
+    * @return the progress object
+    * @throws IllegalStateException when the manager is disconnected
+    */
+   public ProgressObject distribute(Target[] targets, ModuleType type,
+         InputStream moduleArchive, InputStream deploymentPlan)
+         throws IllegalStateException
+   {
+      return doDistribute(targets, type, moduleArchive, deploymentPlan);
+   }
+
+   private ProgressObject doDistribute(Target[] targets, ModuleType type,
+         InputStream moduleArchive, InputStream deploymentPlan)
+      throws IllegalStateException
+   {
       if (isConnected == false)
          throw new IllegalStateException("DeploymentManager is not connected");
 
@@ -369,13 +394,15 @@
          // create the temp file that contains the deployment
          TargetModuleInfo moduleInfo = createDeployment(moduleArchive, metaData.getDeploymentName());
          URL deployment = moduleInfo.getModuleID();
+         if( type == null )
+            type = moduleInfo.getModuleType();
 
          // create the target module ids
          for (int i = 0; i < targets.length; i++)
          {
             JBossTarget target = (JBossTarget)targets[i];
             String moduleID = deployment.toExternalForm();
-            targetModuleIDs[i] = new TargetModuleIDImpl(target, moduleID, null, false, moduleInfo.getModuleType());
+            targetModuleIDs[i] = new TargetModuleIDImpl(target, moduleID, null, false, type);
          }
 
          // delete all temp files, except the depoyment




More information about the jboss-cvs-commits mailing list