Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 53286 invoked from network); 6 Feb 2005 21:42:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Feb 2005 21:42:02 -0000 Received: (qmail 58707 invoked by uid 500); 6 Feb 2005 21:42:02 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 58615 invoked by uid 500); 6 Feb 2005 21:42:01 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 58601 invoked by uid 99); 6 Feb 2005 21:42:01 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from savgw1.sandcherry.com (HELO savgw1.sccorp.com) (205.158.232.68) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 06 Feb 2005 13:42:00 -0800 Received: from exchange01.sccorp.com ([10.20.1.32]) by savgw1.sccorp.com (SAVSMTP 3.1.3.37) with SMTP id M2005020614415712072 for ; Sun, 06 Feb 2005 14:41:57 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: HttpClient under load Date: Sun, 6 Feb 2005 14:11:46 -0700 Message-ID: <81EA33D2D997D948BC14AC780BD495847B7B86@exchange01.sccorp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: HttpClient under load Thread-Index: AcULdaOCF6Lq9g6RRUarn7DohPFaWABGpegg From: "Prasad Sethumadhavan" To: "HttpClient User Discussion" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Oleg, Thanks a lot. It works really well. Thanks Prasad=20 -----Original Message----- From: Oleg Kalnichevski [mailto:olegk@apache.org]=20 Sent: Saturday, February 05, 2005 4:31 AM To: HttpClient User Discussion Subject: RE: HttpClient under load Prasad, Simply create a separate HttpState instance per thread and pass it as a parameter to the HttpClient#executeMethod. The global HttpState instance is used only when the HttpState parameter to executeMethod is null.=20 The following code snippet may be helpful: http://mail-archives.eu.apache.org/mod_mbox/jakarta-httpclient- user/200501.mbox/%3c1106852264.4926.6.camel@localhost.localdomain%3e Oleg On Fri, 2005-02-04 at 20:11 -0700, Prasad Sethumadhavan wrote: > Hi, > I am using a single HttpClient that is shared by more than 100 threads. > Each thread is a separate user and hence should have separate=20 > session/cookie information. However, the HttpClient has a single=20 > HttpState object that saves all the cookies. How should I go about=20 > implementing this? >=20 > Thanks in advance > Prasad >=20 > -----Original Message----- > From: Michael Becke [mailto:becke@u.washington.edu] > Sent: Thursday, February 03, 2005 6:33 AM > To: HttpClient User Discussion > Subject: Re: HttpClient under load >=20 > Hi Prasad, >=20 > > I am trying to implement a "fetch timeout" feature using the http=20 > > client. Basically it means that if I have not received a complete=20 > > response within "n" seconds then I need to return a fetch timeout. > > Is there any built in mechanism in HttpClient for this or do I need=20 > > to >=20 > > have a monitor thread that calls HttpMethod.abort() after the=20 > > timeout period (if the method has not finished execution). What=20 > > would be the result of calling the abort method on the worker=20 > > thread? (what exceptions etc..). Please advise if there are any=20 > > better ways to implement the same. >=20 > HttpMethod.abort() is the way to go. You will need to keep track of=20 > the execution time and abort the methods from a separate thread. > Calling abort will most likely cause an IOException but it depends=20 > where exactly the method is in the process of execution. >=20 > Mike >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail:=20 > httpclient-user-help@jakarta.apache.org >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail:=20 > httpclient-user-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org