Targets for _at_UriParam, _at_QueryParam, _at_MatrixParam and _at_HeaderParam

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 03 Oct 2007 15:11:30 -0400

Currently the annotations @UriParam, @QueryParam, @MatrixParam and
@HeaderParam can all be applied to constructor parameters, method
parameters, class fields and class methods. I'd like to suggest that
we remove the ability to attach these annotations to class fields and
methods and only allow their use on constructor and method
parameters. Here's why:

- Field and method injection normally only happens at object creation
time (after the constructor is called). For a singleton it makes no
sense to inject a per-request value like those provided by these
- For a per-request resource lifecycle we already support constructor
parameters so field and method injection don't add any real value.

Any objections ?

Marc Hadley <marc.hadley at>
CTO Office, Sun Microsystems.