[Resteasy-users] Pool for javax.ws.rs.client.Client objects?

2014-10-27 Thread Rodrigo Uchôa
Hi guys! I have a client web application that uses the Client API to make REST calls to a REST business layer. The javax.ws.rs.client.Client docs clearly states that Client objects are expensive to create and dispose, and only a small number of them should be created, which makes me think they

Re: [Resteasy-users] Pool for javax.ws.rs.client.Client objects?

2014-10-27 Thread Savvas Andreas Moysidis
The question, I suppose, is whether Client implementations are thread-safe or not which is something that is not stipulated by the interface contract. If they are(something which is sort of implied by the javadoc), then you could maybe declare and use a single instance like the following? (in a

Re: [Resteasy-users] Pool for javax.ws.rs.client.Client objects?

2014-10-27 Thread Rodrigo Uchôa
if Client implementations are thread-safe, shouldn't a single instance be enough? Thus having a single instance for the whole app would do it. I don't think it's the case. On Mon, Oct 27, 2014 at 10:21 PM, Savvas Andreas Moysidis savvas.andreas.moysi...@gmail.com wrote: The question, I