DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
dam.setDeploymentAspects(aspects);
dam.deploy(dep);
} finally {
if (dep != null) {
dep.removeAttachment(ServiceTarget.class);
}
SecurityActions.setContextClassLoader(origClassLoader);
}
Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
deployment.addAttachment(StandardContext.class, startWebApp(host, unit)); //TODO simplify and use findChild later in destroy()/stopWebApp()