Hi
>
> Are UriBuilder instances thread-safe?  If I assembled a cache of UriBuilder 
> instances mapped to the public methods of my class (which have the @GET or 
> @POST annotation), can I then use that and call "build()" and other methods 
> on that instance?  For instance, does "build()" on a UriBuilder return the 
> same instance, or a new one?
>

uriBuilder.build() returns a new URI instance every time.
I think, in CXF at least, calling build() on the same cached
UriBuilder instance, should be safe too because it does not modify any
state internally while building a URI. uriBuilder.clone won't be, but
uriBuilder.build() should be ok...

Cheers, Sergey

Reply via email to