On Sun, 2010-09-19 at 11:47 +0530, arpita k wrote:
> Hi,
>
> I am using HttpClient 4.0 for client and server communication.
>
> Here is my code to open a connection:
>
> HttpParams params = *new* BasicHttpParams();
>
> // Increase max total connection to 200
>
> ConnManagerParams.*setMaxTotalConnections*(params, 5);
>
> // Increase default max connection per route to 20
>
> ConnPerRouteBean connPerRoute = *new* ConnPerRouteBean(5);
>
> ConnManagerParams.*setMaxConnectionsPerRoute*(params, connPerRoute);
>
> Scheme httpsScheme = *new* Scheme("https", socketFactory, 443);
>
> SchemeRegistry schemeRegistry = *new* SchemeRegistry();
>
> schemeRegistry.register(httpsScheme);
>
> ClientConnectionManager cm = *new* ThreadSafeClientConnManager(params,
> schemeRegistry);
>
> signClient = *new* DefaultHttpClient(cm, params);
>
> But I am using around 5 connection in the connection pool.but after using
> one connection it is not returning back the connection in the connection
> pool.It was kept alive.I like to know how to release the connection so
> that same connection could be used further.
>
> Your help will be appreciated.
>
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d4e143
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]