On Sep 19, 2009, at 3:32 AM, Felipe Gaścho wrote:
> I got it, but I have a second question: should I use the @Context
> HttpHeaders as method param or type member ?
>
> @Context HttpHeaders header;
>
> @POST
> public Response insert(@QueryParam("login") String login) {
> ......
> }
>
> ---------- OR:
>
> @POST
> public Response insert(@Context HttpHeaders header,
> @QueryParam("login") String login) {
> ......
> }
>
> ??
>
> is it thread safe to use the @Context as type member ?
>
Either works, the injected instance is thread-local and therefore
thread safe.
Marc.