hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCLIENT-968) Provide a way to configure ConnPerRoute for ThreadSafeClientConnManager
Date Sun, 18 Jul 2010 09:10:50 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889592#action_12889592
] 

Oleg Kalnichevski commented on HTTPCLIENT-968:
----------------------------------------------

Mingfai,

I am not sure I understand the problem you are having with connections per route configuration.
 Why can't you just use #setMaxForRoute() / #setDefaultMaxPerRoute() methods? Why do you need
access to the ConnPerRouteBean at all?

Oleg


> 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


Mime
View raw message