try {
InputStream input = archive.as(ZipExporter.class).exportZip();
DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan().withRollback();
builder = builder.add(archive.getName(), input).andDeploy();
DeploymentPlan plan = builder.build();
DeploymentAction deployAction = builder.getLastAction();
executeDeploymentPlan(plan, deployAction,archive);
return getContainerMethodExecutor(context);
} catch (Exception e) {
throw new DeploymentException("Could not deploy to container", e);