On 11/30/2012 12:49 AM, Mark Thomas wrote:
>
> Long version:
> metadata-complete controls whether or not a Servlet container scans JARs for Servlet annotations (Servlets, Filters and Listeners). The mechanism by which other components can scan for classes of interest is the @HandlesTypes annotation on a ServletContextInitializer (SCI). metadata-complete has no impact on SCI processing. If we take the approach suggested above we would have to package our own class scanning within the WebSocket JAR.
>
I think that is incorrect. metadata-complete impacts SCI processing. It
impacts the complete scanning of *all* annotations not just servlet
annotations.
For e.g:
web.xml has metadata-complete=true
war has one class A with @WebService
war has one SCI class B with @HandleTypes(WebService.class)
When SCI B is invoked, but A *won't* be passed in the Set parameter of
onStartup(Set, ServletContext).
Jitu