// Initialize annotation processor
if (ok && !getIgnoreAnnotations()) {
if (annotationProcessor == null) {
if (isUseNaming() && namingContextListener != null) {
annotationProcessor =
new DefaultAnnotationProcessor(namingContextListener.getEnvContext());
} else {
annotationProcessor = new DefaultAnnotationProcessor(null);
}
}
getServletContext().setAttribute
(AnnotationProcessor.class.getName(), annotationProcessor);
}