Bernd Bohmann wrote:
The AnnotationProcessor/InjectionProvider are very similar. I don't like
to define a new myfaces Interface for this use case. I would prefer the
org.apache.AnnotationProcessor because is not tomcat specific and an
apache implementation. Until we find a final solution we should only
copy the code.
I just had a look at InjectionProvider, and somehow the API is identical
to AnnotationProcessor. It did not start that way, and I did not look at
InjectionProvider at all (so I suppose it means the API makes sense :D).
The interface is used by Catalina (the Servlet container) and also
Jasper (Jasper gets the implementation using a specific context attribute).
Unfortunately, I don't see a way to do non proprietary
annotation/injection processing, since the component that has to do it
(JSP or JSF) cannot possibly get the configuration (which could define
overrides, etc). Since I suppose you'll want to support all containers,
that's a problem. (It would have been solved if the servlet spec had
defined an interface like InjectionProvider in javax.servlet, of course.)
It's no problem to use the annotation name instead of using the class.
But personal i prefer the class.
Rémy
- Re: @PreDestroy, Servlet API, Remy Maucherat
-