Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 1742 invoked from network); 19 Mar 2009 12:13:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 12:13:48 -0000 Received: (qmail 46261 invoked by uid 500); 19 Mar 2009 12:13:47 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 46232 invoked by uid 500); 19 Mar 2009 12:13:47 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 46221 invoked by uid 99); 19 Mar 2009 12:13:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 05:13:47 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kdobrik.axis2@googlemail.com designates 209.85.220.163 as permitted sender) Received: from [209.85.220.163] (HELO mail-fx0-f163.google.com) (209.85.220.163) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 12:13:38 +0000 Received: by fxm7 with SMTP id 7so482684fxm.22 for ; Thu, 19 Mar 2009 05:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=zViHrEZbdglw6/SK8vBawUlRtrLS665I49MFJ1NQfyI=; b=nR+43bcsyA5V+SuWTESw2N0ZGVwyxqMX4rI4q1TzljnlTNMa4l+JDMrZG06AJk9jRr F/0Uq6fxZc06y6glmy7DJXcfOl1veEsYB9rybN0845Ork0KERJuMtKtl7PeBDU/iYwEq Fm5NoMMRm97dWvKyhM/wT48YEIFia3+4Gw2y8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Zczzf/pwUnkWh8ppfiAmVT26dDUSdG+Ge77k/6F+bVbPRlg7rzbbb58ExhuGlHOYXd AMVRhqkGu8n3kFsINRa4XkJ6DPto+diqGW3RdyCf1XLSJTuYHsemcMYamWRqSpTotpo/ p9FzZxBMQkMtxNGvR8bG6fGe2DvbN7s3ogKuI= MIME-Version: 1.0 Received: by 10.204.118.207 with SMTP id w15mr813293bkq.126.1237464797078; Thu, 19 Mar 2009 05:13:17 -0700 (PDT) Date: Thu, 19 Mar 2009 14:13:17 +0200 Message-ID: <3b3bfaf80903190513m7a068fdds5dcd38fdce6858e3@mail.gmail.com> Subject: Reuse of HTTPClient among different invocations is ok, what about different Web Services, hosts? From: Dobri Kitipov To: HttpClient User Discussion Content-Type: multipart/alternative; boundary=0016e6dd8e74a6e50f046577b9de X-Virus-Checked: Checked by ClamAV on apache.org --0016e6dd8e74a6e50f046577b9de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi everybody, when we reuse HTTPClient underneath each subsequent call to HttpClient.executeMethod() will go to the connection manager (MultiThreadedHttpConnectionManager) and ask for an instance of HttpConnection. I have tested some use cases when a HTTPClient is reused for invocation of a single WS and I can verify there is socket reuse. So far so good. Anyway, my question is: could we expect any problems when reusing HTTPClient among different threads calling different WSs which are deployed at different hosts/servers? As stated at - http://hc.apache.org/httpclient-3.x/threading.html - there is a test case that demonstrates how HTTPClient can be reused among different threads which in turn invoke different web services (WSs). My concern is that HTTPClient has HttpState which I am not sure could be reused/shared among different WSs invocations (JavaDoc says for HttpState: "A container for HTTP attributes that may persist from request to request, such as {@link Cookie cookies} and authentication {@link Credentials credentials}.")? Can different WS clients share one HttpClient and its HttpState among different threads and invoking different WSs (e.g. at differnet hosts)? Thank you in advance, Dobri --0016e6dd8e74a6e50f046577b9de--