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