Like Bill pointed out in the thread - there are some exceptions to the
rule. This is one of the exceptions where metadata-complete does not
disable scanning of ServletContainerInitializers and related annotations
(HandlesTypes) bundled with the application. This was one of the key
pluggability contracts that was added in Servlet 3.0.
- Rajiv
On 6/1/12 12:07 PM, Mark Thomas wrote:
> On 25/05/2012 09:22, Jan Bartel wrote:
>> Rajiv,
>>
>> On 24 May 2012 23:59, Rajiv Mordani<rajiv.mordani_at_oracle.com> wrote:
> <snip/>
>
>>> The application would explicitly use an annotation in the code - so the
>>> behavior will be expected by the application by the fact that it used the
>>> particular annotation.
>> Not necessarily. As per http://java.net/jira/browse/SERVLET_SPEC-36, a
>> servlet 3.0 container is required to look for
>> ServletContextInitializers inside WEB-INF/lib jars. If an application
>> uses a jar that happens to have one of these then when the app is
>> deployed on a 2.5 compliant container it may have different and
>> unexpected behaviour on a servlet 3.0 container. Unless a user sees
>> the source of all the jars in WEB-INF/lib there's no way for them to
>> know that such annotations are present.
> Ping.
>
> I have yet to see a response to this particular point.
>
> And the same point applies to all the other new 3.0 annotations if
> meta-data complete is not specified.
>
> I understand why the specification is written the way it is but the
> above is one of the less pleasant side-effects. Is this really the way
> we want to go?
>
> Mark