public synchronized void include(QName deployable, String planName) throws DeploymentException { Composite wrapper = createWrapper(deployable); DeploymentPlan plan; if (planName == null) { if (RuntimeMode.CONTROLLER == info.getRuntimeMode() && !isLocal()) { plan = contributionHelper.findDefaultPlan(deployable); if (plan == null) { plan = SYNTHETIC_PLAN; } } else { plan = SYNTHETIC_PLAN; } } else { // plan specified plan = contributionHelper.findPlan(planName); if (plan == null) { throw new DeploymentPlanNotFoundException("Deployment plan not found: " + planName); } } for (DeployListener listener : listeners) { listener.onDeploy(deployable, plan.getName()); } instantiateAndDeploy(wrapper, plan, false); for (DeployListener listener : listeners) { listener.onDeployCompleted(deployable, plan.getName()); } }