final ClassLoader classLoader = module.getClassLoader();
final JBossWebMetaData metaData = warMetaData.getMergedJBossWebMetaData();
final List<SetupAction> setupActions = deploymentUnit.getAttachmentList(org.jboss.as.ee.component.Attachments.WEB_SETUP_ACTIONS);
// Resolve the context factory
WebContextFactory contextFactory = deploymentUnit.getAttachment(WebContextFactory.ATTACHMENT);
if (contextFactory == null) {
contextFactory = WebContextFactory.DEFAULT;
}
// Create the context
final StandardContext webContext = contextFactory.createContext(deploymentUnit);
final JBossContextConfig config = new JBossContextConfig(deploymentUnit, this.service);
// Add SecurityAssociationValve right at the beginning
webContext.addValve(new SecurityContextAssociationValve(deploymentUnit));
// Set the deployment root
try {
webContext.setDocBase(deploymentRoot.getPhysicalFile().getAbsolutePath());
} catch (IOException e) {
throw new DeploymentUnitProcessingException(e);
}
webContext.addLifecycleListener(config);
final String pathName = pathNameOfDeployment(deploymentUnit, metaData);
webContext.setPath(pathName);
webContext.setIgnoreAnnotations(true);
webContext.setCrossContext(!metaData.isDisableCrossContext());
// Hook for post processing the web context (e.g. for SIP)
contextFactory.postProcessContext(deploymentUnit, webContext);
final WebInjectionContainer injectionContainer = new WebInjectionContainer(module.getClassLoader());
// see AS7-2077
// basically we want to ignore components that have failed for whatever reason