// Calling this twice isn't harmful so no syncs
servletSecurityAnnotationScanRequired = false;
+ Context ctxt = (Context) getParent();
+
+ if (ctxt.getIgnoreAnnotations()) {
+ return;
+ }
+
ServletSecurity secAnnotation =
servlet.getClass().getAnnotation(ServletSecurity.class);
- Context ctxt = (Context) getParent();
if (secAnnotation != null) {
ctxt.addServletSecurity(
new ApplicationServletRegistration(this, ctxt),
*/
protected synchronized void authenticatorConfig() {
- // Always need an authenticator to support @ServletSecurity annotations
LoginConfig loginConfig = context.getLoginConfig();
if (loginConfig == null) {
- loginConfig = DUMMY_LOGIN_CONFIG;
- context.setLoginConfig(loginConfig);
+ if (context.getIgnoreAnnotations()) {
+ return;
+ } else {
+ // Not metadata-complete, need an authenticator to support
+ // @ServletSecurity annotations
+ loginConfig = DUMMY_LOGIN_CONFIG;
+ context.setLoginConfig(loginConfig);
+ }
}
// Has an authenticator been configured already?