users@jersey.java.net

Re: Passing around UriInfo - UriInfo.getAbsolutePathBuilder gets messed up

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 26 Feb 2008 11:00:56 +0100

Martin Grotzke wrote:
> Hi Paul,
>
> I don't know how I was able to produce the behavior I described, but now
> it's not possible to reproduce this - all test are running through even
> when I invoke getAbsolutePathBuilder on the same UriInfo in different
> resources (but I'm sure I really experienced this ;)).
>

Phew! i was getting a bit worried.


> So please excuse the confusion,

It is OK. Note that on some injected instances one should be careful not
to retain instances returned from the methods called on the injected
instances, as they won't be thread-safe and proxied. Perhaps this is
what led to what you experienced? This is especially important if the
HttpContextAccess and obtaining request/response ifaces from that.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109