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));