users@jersey.java.net

[Jersey] Jersey Client 2.x - Multi threading

From: Renaudin Guillaume <guillaume.renaudin_at_sopra.com>
Date: Mon, 28 Apr 2014 14:54:41 +0000

Hi everyone,

I know this question was already posted in another forum, but I need a confirmation. I need to know if the Jersey Client API is thread safe :

· On the client creation

· On the webresource retrieving for a given URL

What I would do is to provide a unique REST client to a Spring managed bean and for each url I can call , a webresource as a singleton. The spring managed bean must be stateless so each one of its methods should call a request on a webresource without any effect on this object.

I saw that for the last version of the 1.x API, the Javadoc say that these objects are thread safe, but it's not relayed in the 2.x one.
If it's always thread safe maybe the Javadoc should tell it, no ?

Thanks in advance for the answer.

Regards,
Guillaume Renaudin.


Cordialement,

Guillaume RENAUDIN
Division Secteur Public

[Sopra]

Sopra
Armor Plazza
5 & 7 Impasse Claude Nougaro - CS 90314
44803 SAINT HERBLAIN CEDEX
France
Phone : +33 (0)2 40 38 92 74
grenaudin@sopra.com<mailto:grenaudin@sopra.com> - www.sopra.com<http://www.sopra.com>


[cid:image002.png@01CF6302.8BF35C20]<http://www.linkedin.com/company/sopra> [cid:image003.png@01CF6302.8BF35C20] <https://www.youtube.com/user/SopraChannel> [cid:image004.png@01CF6302.8BF35C20] <https://www.facebook.com/sopragroup> [cid:image005.png@01CF6302.8BF35C20] <https://twitter.com/soprarh> [cid:image006.png@01CF6302.8BF35C20] <http://fr.viadeo.com/fr/company/sopra>
Ce message peut contenir des informations confidentielles dont la divulgation est à ce titre rigoureusement interdite en l'absence d'autorisation explicite de l'émetteur. Dans l'hypothèse où vous auriez reçu par erreur ce message, merci de le renvoyer à l'émetteur et de détruire toute copie.

P Pensez à l'environnement avant d'imprimer.





image001.png
(image/png attachment: image001.png)

image002.png
(image/png attachment: image002.png)

image003.png
(image/png attachment: image003.png)

image004.png
(image/png attachment: image004.png)

image005.png
(image/png attachment: image005.png)

image006.png
(image/png attachment: image006.png)