Discussion:
Jersey Client 2.x - Multi threading
(too old to reply)
Renaudin Guillaume
2014-04-28 14:54:41 UTC
Permalink
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-***@public.gmane.org<mailto:grenaudin-***@public.gmane.org> - www.sopra.com<http://www.sopra.com>


[cid:image002.png-RhYvpr+Kd/***@public.gmane.org]<http://www.linkedin.com/company/sopra> [cid:image003.png-RhYvpr+Kd/***@public.gmane.org] <https://www.youtube.com/user/SopraChannel> [cid:image004.png-RhYvpr+Kd/***@public.gmane.org] <https://www.facebook.com/sopragroup> [cid:image005.png-RhYvpr+Kd/***@public.gmane.org] <https://twitter.com/soprarh> [cid:image006.png-RhYvpr+Kd/***@public.gmane.org] <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.
cowwoc
2014-04-28 15:16:04 UTC
Permalink
Post by Renaudin Guillaume
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 ?
+1

Gili

Loading...