Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42BEEE4B4 for ; Thu, 24 Jan 2013 06:05:18 +0000 (UTC) Received: (qmail 26995 invoked by uid 500); 24 Jan 2013 06:05:17 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 26747 invoked by uid 500); 24 Jan 2013 06:05:15 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 26689 invoked by uid 99); 24 Jan 2013 06:05:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 06:05:12 +0000 Date: Thu, 24 Jan 2013 06:05:12 +0000 (UTC) From: "Martin Meinhold (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCLIENT-1298) Unable to shutdown executor service used by AsynchronousValidator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Meinhold updated HTTPCLIENT-1298: ---------------------------------------- Attachment: 0001-HTTPCLIENT-1298-Add-AsynchronousValidator-in-HttpCli.patch Let me know if you have any trouble with the patch. > Unable to shutdown executor service used by AsynchronousValidator > ----------------------------------------------------------------- > > Key: HTTPCLIENT-1298 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1298 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Cache > Affects Versions: 4.2.3 > Reporter: Martin Meinhold > Fix For: 4.3 Alpha2 > > Attachments: 0001-HTTPCLIENT-1298-Add-AsynchronousValidator-in-HttpCli.patch > > > Currently there is no way to tell the CachingHttpClient to shutdown the executor service used by its AsynchronousValidator. This could lead to a resource leak, but probably only in cases when the threads weren't reclaimed by the thread pool. So only when it is actually processing tasks. As long as the thread pool isn't used, it won't create threads. > From an application life-cycle point of view there should be a way to explicitly tell the HttpClient to shutdown and release all resources now regardless whether there are any outstanding validation requests or not. > I have a patch against version 4.2.1 which in fact adds a shutdown() method to the HttpClient and the AsynchronousValidator. Today I saw, there is already a CloseableHttpClient. So do you need any contribution to fix this? Looks like there is already a plan for that. > Btw: thanks for already supporting the background validation via the stale-while-revalidate header. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org