throw new Exception("Could not start web app", e);
}
throw new Exception("Could not start web app for unknown reason");
}
if (applicationPolicyConfigurationManager != null) {
SpecSecurityBuilder specSecurityBuilder = new SpecSecurityBuilder(webSecurityConstraintStore.exportMergedWebAppInfo());
Map<String, ComponentPermissions> contextIdPermissionsMap = new HashMap<String, ComponentPermissions>();
contextIdPermissionsMap.put(policyContextId, specSecurityBuilder.buildSpecSecurityConfig());
//Update ApplicationPolicyConfigurationManager
try {
applicationPolicyConfigurationManager.updateApplicationPolicyConfiguration(contextIdPermissionsMap);
} catch (LoginException e) {
throw new RuntimeException("Fail to set application policy configurations", e);
} catch (PolicyContextException e) {
throw new RuntimeException("Fail to set application policy configurations", e);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Fail to set application policy configurations", e);
} finally {
//Clear SpecSecurityBuilder
specSecurityBuilder.clear();
}
}
fullyStarted = true;
} finally {
setRestrictListeners(true);