users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Client (and WebTarget) thread-safety, in specification

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Mon, 10 Nov 2014 12:10:02 -0500

Lucas,

 Yes, the specification is silent about thread safety on these classes, which means you cannot assume thread safety. You may want to consult the documentation of the implementation you are using.

 There's already an issue filed for JAX-RS 2.1 (next version) to clarify this point.

-- Santiago

On Nov 10, 2014, at 2:50 AM, Lucas Ventura Carro <useyour.mind_at_gmail.com> wrote:

> As some users we are asking here:
> http://stackoverflow.com/q/18078666/1099452
>
> We don't know how should be handled the Client thread-safety. Client javadoc only says about closing resources, to be reused.
> But, what about multiple threads using same client instance? It is not part of the spec and is an implementation decision?
>
> Thanks!
> --
> Lucas
>