[jboss-dev-forums] [Design the new POJO MicroContainer] - Wrong position of DeploymentControllerContext addition

alesj do-not-reply at jboss.com
Wed Jun 18 06:02:02 EDT 2008


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158927#4158927

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158927



More information about the jboss-dev-forums mailing list