To decrease the number of connections for connection manager dynamically.
-------------------------------------------------------------------------
Key: HTTPCLIENT-894
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-894
Project: HttpComponents HttpClient
Issue Type: Question
Components: HttpClient
Affects Versions: 3.1 Final
Environment: Windows
Reporter: Alok Chaudhary
Priority: Minor
Fix For: 3.1.1
Hello,
I have a quick query regarding MultiThreadedHttpConnectionManager. At the
application startup, i fetched no of connections value from my cache. Based on
the connection value, i initialized MultiThreadedHttpConnectionManager.
MultiThreadedHttpConnectionManager mgr = new
MultiThreadedHttpConnectionManager() ;
mgr.getParams().setDefaultMaxConnectionsPerHost(10);
mgr.getParams().setMaxTotalConnections(10);
HttpClient client = new HttpClient(mgr) ;
Now if i dynamically increase the no of connections say "12" in my cache then
my netstas shows me 12 connections. I dont have any issue in this.
But when i dynamically decrease the number of connections say "8", connection
manager does not reflect the "8" connections. Netstat still shows "12"
connections in established state.
I have 20 threads those are using my HttpClient, so i dont want to shut down my
connection manager.
My questions are:
1) Is there any way or alternative to decrease the connections dynamically
without shutting down connection manager?
2) What will happen to those threads using my client if i shutdown my manager
in bertween request processing?
Any help will be appreciated.
--
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]