[ 
https://issues.apache.org/jira/browse/MYFACES-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896629#action_12896629
 ] 

Leonardo Uribe commented on MYFACES-2860:
-----------------------------------------

I attached a prototype for this feature. The idea is provide the following 
interface:

public interface AnnotationProvider
{
    public Collection<Class<?>> getAnnotatedWebInfClasses(ExternalContext ctx, 
Set<URL> urls);
    
    public Collection<Class<?>> getAnnotatedMetaInfClasses(ExternalContext ctx, 
Set<URL> urls);
    
    public Collection<Class<?>> getAnnotatedMyfacesImplClasses(ExternalContext 
ctx, URL url);
}

After checking the algorithm and jsf 2.0 spec javadoc, it was clear the three 
cases are quite different. It is not the same to get annotations of 
/WEB-INF/classes, than retrieve it form classes inside jar files, that retrieve 
it from myfaces impl jar (actually there is no annotations but it could be on 
the future).

Suggestions are welcome.

> Provide AnnotationScanner interface
> -----------------------------------
>
>                 Key: MYFACES-2860
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2860
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.1
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: jboss-myfaces.zip, Myfaces-2.0-jsf.deployer.zip, 
> MYFACES-2860-1.patch
>
>
> Looking integration of myfaces with JBoss AS6, it was notice myfaces does not 
> have a way to override the annotation configurator.
> Ri has a class called AnnotationProvider with this methods:
> public AnnotationProvider(ServletContext sc) 
> abstract public Map<?> getAnnotatedClasses(Set<URL> urls)
> the documentation says it is possible to override using this type of 
> constructor.
> public AnnotationProvider(ServletContext sc, AnnotationProvider parent)
> We should provide something similar (let's call it AnnotationScanner because 
> its objective is scan for annotations).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to