users@jersey.java.net

[Jersey] Multithread rest service

From: <waiha_othafa_at_yahoo.com>
Date: Thu, 2 Feb 2012 12:24:14 +0000 (GMT)

Hello all.
I am implementing a web service using jersey that is basically a bridge
to a list of other webservices.
Something like

Client -> WebService -> Backend List(1) -> dispatch message to BackEnd

(1) - This list is static meaning that there are only a given number of
backends to be shared between all clients.
The communication between my webservice and the backend is implemented
using Apache HttpClient.
What would be the most scalable option? Implement a method on each
class implementing a backend which would by means of an httpclient call
the backend's url.
Create an object encapsulating the request ? Something like Backend ->
new SubmissionChannel -> HttpClient -> Post to Backend URL?
What would be the threading considerations?

Thank you in advance for your insights.