2 Replies Latest reply on Oct 5, 2007 11:42 AM by Ales Justin

    MainDeployerImpl process managed deployment

    Ales Justin Master

      Just something I noticed when looking how to get a hold of runtime component's name in true OO fashion. :-)

      Is this done on purpose - that we are skipping process on 2nd level context.
      Since we do do getChildren on top contexts, and then immediately getChildren on those child contexts:

       public ManagedDeployment getManagedDeployment(String name) throws DeploymentException
       {
       DeploymentContext context = getDeploymentContext(name);
       if (context == null)
       throw new IllegalArgumentException("Context not found: " + name);
      
       Map<String, ManagedObject> rootMOs = getManagedObjects(context);
       ManagedDeployment root = mgtDeploymentCreator.build(context.getDeploymentUnit(), rootMOs, null);
       for (DeploymentContext childContext : context.getChildren())
       {
       processManagedDeployment(childContext, root);
       }
       return root;
       }
      
       protected void processManagedDeployment(DeploymentContext context, ManagedDeployment parent)
       throws DeploymentException
       {
       for (DeploymentContext childContext : context.getChildren())
       {
       DeploymentUnit childUnit = childContext.getDeploymentUnit();
       Map<String, ManagedObject> childMOs = getManagedObjects(childContext);
       ManagedDeployment childMD = mgtDeploymentCreator.build(childUnit, childMOs, parent);
       processManagedDeployment(childContext, childMD);
       }
       }
      


      There is no lookup on processManagedDeployment context param.