Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 98152 invoked from network); 17 Jul 2010 00:03:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Jul 2010 00:03:46 -0000 Received: (qmail 65395 invoked by uid 500); 17 Jul 2010 00:03:46 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 65376 invoked by uid 500); 17 Jul 2010 00:03:45 -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 65368 invoked by uid 99); 17 Jul 2010 00:03:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jul 2010 00:03:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jul 2010 00:03:42 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6GNtnRA010705 for ; Fri, 16 Jul 2010 23:55:50 GMT Message-ID: <21682138.432351279324549677.JavaMail.jira@thor> Date: Fri, 16 Jul 2010 19:55:49 -0400 (EDT) From: "Mingfai Ma (JIRA)" To: dev@hc.apache.org Subject: [jira] Commented: (HTTPCLIENT-968) Provide a way to configure ConnPerRoute for ThreadSafeClientConnManager In-Reply-To: <19657960.429161279318249558.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889422#action_12889422 ] Mingfai Ma commented on HTTPCLIENT-968: --------------------------------------- just realize i can use the deprecated way to configure conn per route. so this issue could be discarded. I suppose ThreadSafeClientConnManager should support configuration of ConnPerRoute via a non-deprecated way. Please feel free to keep this issue for tracking that requirement or just close it. If the HttpParams will be reverted to non-deprecated, we could read the ConnPerRouteBean from the param instead of creating a new one every time. + Object connPerRouteBean = params.getParameter(ConnManagerPNames.CONNECTIONS_PER_ROUTE); + this.connPerRoute = connPerRouteBean!=null? (ConnPerRouteBean)connPerRouteBean: new ConnPerRouteBean(); > Provide a way to configure ConnPerRoute for ThreadSafeClientConnManager > ----------------------------------------------------------------------- > > Key: HTTPCLIENT-968 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-968 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.1 Alpha2 > Reporter: Mingfai Ma > > In ThreadSafeClientConnManager, both constructors (the 2nd one is depreciated) create a new ConnPerRouteBean that is used by createConnectionPool() immediately. There is no way to increase the ConnPerRoute in tsccm. Even if I tried to extend TSCCM and overrride createConnectionPool(), I can't make the ConnPerRouteBean configurable (because the createConnPool method is called in the super's constructor). The easiest solution is for me to copy the code of TSCCM and make my own connection manager. > I think the TSCCM should provide a way to configure ConnPerRouteBean. > I'm trying to see how can it be changed: > * add a constructor argument for connPerRouteBean - this is the the simplest solution but obviously a bad idea. > * I guess because of HTTPCLIENT-673, the old ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE static param that doesn't depend on HttpRoute is depreciated. It makes very much sense. However, could the static parameter be replaced with a new parameter that take a ConnPerRouteBean and keep the 2nd constructor in TSCCM and make the constructor use the new param? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org