On Dec 28, 2012, at 4:35 PM, Arun Gupta <arun.p.gupta_at_oracle.com> wrote:
> 6.5.2 says
>
> -- cut here --
> Note that returning filters or interceptors from the methods getClasses or getSingletons in an application subclass will bind them globally only if they are not decorated with a name binding annotation.
> -- cut here --
>
>
> If filter or interceptor does not have any @NameBinding annotation then they are globally bound anyway. What is the use case of returning such a filter from getClasses or getSingletons ?
They are bound globally only if they are automatically discovered. For that to happen, they must be annotated by @Provider. If they are not, then using the Application sub-class is the way to register them.
-- Santiago