users@jax-rs-spec.java.net

[jax-rs-spec users] Re: _at_PreMatching and _at_NameBinding

From: Arun Gupta <arun.p.gupta_at_oracle.com>
Date: Thu, 03 Jan 2013 17:02:13 -0800

Hi Santiago,

On 1/2/13 6:34 AM, Santiago Pericas-Geertsen wrote:
> Hi Arun,
>
> On Dec 28, 2012, at 6:45 PM, Arun Gupta <arun.p.gupta_at_oracle.com
> <mailto:arun.p.gupta_at_oracle.com>> wrote:
>
>> @PreMatching javadoc says:
>>
>> -- cut here --
>> Global binding annotation that can be applied to a|container request
>> filter|
>> <http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/container/ContainerRequestFilter.html>to
>> indicate that such filter should be applied globally on all resources
>> in the application before the actual resource matching occurs.
>> -- cut here
>>
>> Does that mean @PreMatching can be put on filters that have
>> @NameBinding ?
>
> Name binding is, of course, post-matching by definition. I don't
> think the spec is currently forbidding the case of a container request
> filter being executed at pre _and_ post extension points. So, I'd say
> the answer is "yes".
@PreMatching filters are global so why would anybody put @NameBinding on
them ?

>
>> Or restricted to a specific resource using DynamicFeature ?
>
> I'm not sure how DynamicFeature relates to your first question. Can
> you elaborate?
I mean @PreMatching can be restricted to a specific resource, instead of
all the resources globally, using DynamicFeature. Is that possible ?

Arun

Arun

>
> -- Santiago
>
>>
>> Javadoc does not say anything about that and need to be clarified.
>>
>> Thanks,
>> Arun
>>
>> --
>> http://twitter.com/arungupta
>> http://blogs.oracle.com/arungupta
>

-- 
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta