1 Reply Latest reply on Jun 18, 2008 8:38 AM by Ales Justin

    Wrong position of DeploymentControllerContext addition

    Ales Justin Master

      There is a bug in DeployersImpl::process. :-)

      The position of where we add DeploymentControllerContext is wrong.
      Or we don't do enough checks.

       controller.install(deploymentControllerContext);
       context.setState(DeploymentState.DEPLOYING);
       log.debug("Deploying " + context.getName());
       context.getTransientAttachments().addAttachment(ControllerContext.class, deploymentControllerContext);
      

      After controller::install.
      But what if it fails there?
      So this is then null:
       DeploymentControllerContext deploymentControllerContext = context.getTransientAttachments().getAttachment(ControllerContext.class.getName(), DeploymentControllerContext.class);
       ControllerState current = deploymentControllerContext.getState();
      


      Should we move that addition before controller::install.
      Or add additional check if DCC is not null?