You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Pankaj Gupta <pa...@yogins.com> on 2009/04/21 00:10:22 UTC

question abt persistent connections in httpcomponents-client-4.0-beta2

Hi,

We have client code taken from the example file  
ClientMultiThreadedExecution.java and we have the client talking to  
Apache backend. We have noticed that the client makes a brand new  
connection on every request. What we want is for the connection pool  
to keep persistent connections to the backend and to reuse those.

One difference between our code and the example is that we do not use  
GetThread but client.execute. We have spent a couple of hours looking  
on google and on hc.apache.org but can't figure it out. Any ideas?

Thanks,
Pankaj


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: question abt persistent connections in httpcomponents-client-4.0-beta2

Posted by Pankaj Gupta <pa...@yogins.com>.
Thanks, that itself was very useful!

Pankaj

On Apr 21, 2009, at 4:35 AM, Oleg Kalnichevski wrote:

> On Mon, Apr 20, 2009 at 03:10:22PM -0700, Pankaj Gupta wrote:
>> Hi,
>>
>> We have client code taken from the example file
>> ClientMultiThreadedExecution.java and we have the client talking to
>> Apache backend. We have noticed that the client makes a brand new
>> connection on every request. What we want is for the connection  
>> pool to
>> keep persistent connections to the backend and to reuse those.
>>
>
> Post a wire/context log of the session.
>
> http://hc.apache.org/httpcomponents-client/logging.html
>
> Oleg
>
>
>> One difference between our code and the example is that we do not use
>> GetThread but client.execute. We have spent a couple of hours  
>> looking on
>> google and on hc.apache.org but can't figure it out. Any ideas?
>>
>> Thanks,
>> Pankaj
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: question abt persistent connections in httpcomponents-client-4.0-beta2

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, Apr 20, 2009 at 03:10:22PM -0700, Pankaj Gupta wrote:
> Hi,
>
> We have client code taken from the example file  
> ClientMultiThreadedExecution.java and we have the client talking to  
> Apache backend. We have noticed that the client makes a brand new  
> connection on every request. What we want is for the connection pool to 
> keep persistent connections to the backend and to reuse those.
>

Post a wire/context log of the session.

http://hc.apache.org/httpcomponents-client/logging.html

Oleg


> One difference between our code and the example is that we do not use  
> GetThread but client.execute. We have spent a couple of hours looking on 
> google and on hc.apache.org but can't figure it out. Any ideas?
>
> Thanks,
> Pankaj
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org