[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mingfai Ma updated HTTPCLIENT-968:
----------------------------------

    Attachment: HTTPCLIENT-968.patch

i haven't setup an environment that could really compile and test the patch. 
The patch is made just to illustrate the concept suggested. It probably will 
work as all are simple changes.

what it does:
* add a parameter PNAME
* make the 2nd constructor NOT deprecated
* if the Conn Per Route bean parameter is defined, then use it instead of 
constructing a new Conn Per Route bean every time

> 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
>         Attachments: HTTPCLIENT-968.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to