Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 11546 invoked from network); 7 Feb 2005 17:17:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Feb 2005 17:17:07 -0000 Received: (qmail 75717 invoked by uid 500); 7 Feb 2005 17:17:02 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 75666 invoked by uid 500); 7 Feb 2005 17:17:02 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 75653 invoked by uid 99); 7 Feb 2005 17:17:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mail21.bluewin.ch (HELO mail21.bluewin.ch) (195.186.18.66) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Feb 2005 09:17:02 -0800 Received: from xbox.localdomain (83.77.46.113) by mail21.bluewin.ch (Bluewin AG 7.0.035) id 4202A91000067161 for commons-user@jakarta.apache.org; Mon, 7 Feb 2005 17:16:59 +0000 Received: by xbox.localdomain (Postfix, from userid 1000) id 1C7DDB6ECA; Mon, 7 Feb 2005 18:16:59 +0100 (CET) Date: Mon, 7 Feb 2005 18:16:59 +0100 From: Oleg Kalnichevski To: Commons Net User list Subject: Re: Will HttpClient wait for response before continuing? Message-ID: <20050207171659.GA2800@xbox.localdomain> Mail-Followup-To: Commons Net User list References: <1107793129.13577.214507854@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1107793129.13577.214507854@webmail.messagingengine.com> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stephen, No it won't. The releaseConnection method among obvious things such as returning the connection back to the connection manager also makes sure that the connection is actually reusable if it is kept alive (open). That pretty much implies making sure that the response body is fully consumed. If your application does not consume the response body in its entirety, the releaseConnection method will do it for it. Hope this answers your question. Oleg On Mon, Feb 07, 2005 at 10:18:49AM -0600, Stephen Charles Huey wrote: > If you do a GET or POST and call getResponseBodyAsString, HttpClient > obviously has to wait for the response. If you don't call that, will it > just continue on to the next request before finishing getting the > response from the first one? I'm trying to debug some connection > pooling stuff on our web app. Here's some sample code from my load > tester: > > > > int result = hc.executeMethod(getLogin); > getLogin.releaseConnection(); > > doNothing(2000); // wait 2 seconds > > hc.executeMethod(getCreate); > getCreate.releaseConnection(); > > doNothing(2000); // wait 2 seconds > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org