jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Not a big fan of _at_NameBinding, remove it?

From: Bill Burke <bburke_at_redhat.com>
Date: Tue, 19 Feb 2013 18:03:40 -0500

If your annotation has a qualifier, then @NameBinding really isn't a
very efficient pattern to implement a filter or interceptor. For
example, let's say you had a @MaxAge annotation that triggered adding a
Cache-Control header with a qualified max-age:

@MaxAge(100)
@GET
public String get() {...}

The @NameBinding filter would have to inject ResourceInfo and look up
the @MaxAge annotation each and ever request to set the value. It is
much better to implement a DynamicFeature in this case so you can
pre-initialize the filter with the annotation's value.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com