import javax.faces.context.ExternalContext;
public class TomEEAnnotationProviderFactory extends AnnotationProviderFactory {
@Override
public AnnotationProvider createAnnotationProvider(final ExternalContext externalContext) {
AnnotationProvider annotationProvider = (AnnotationProvider) externalContext.getApplicationMap().get(DefaultAnnotationProviderFactory.ANNOTATION_PROVIDER_INSTANCE);
if (annotationProvider == null) {
annotationProvider = new TomEEAnnotationProvider();
externalContext.getApplicationMap().put(DefaultAnnotationProviderFactory.ANNOTATION_PROVIDER_INSTANCE, annotationProvider);
}
return annotationProvider;