hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Problem sending request using HttpClient when the server receiving request goes down and is started again.
Date Fri, 28 Mar 2008 09:54:27 GMT

On Thu, 2008-03-27 at 11:53 +0000, gagneet wrote: 
> Hi Oleg,
>   As I was using Singleton HttpClient object the JSESSIONID persisted for every request.
I have cleared the persistence by calling clearCookies() method on the HttpState object corresponding
to the HttpClient object. Should I call this method after every call or should I call it only
if the connection is timed out? Please advice.
>    
>   Regards,
>   Gagneet
> 

Gagneet,

It really depends on how your application manages conversation state on
the client side. Usually applications are expected to maintains an
instance of HttpState per distinct user / thread of execution. This way,
you would not have to mix cookies that belong to different users, and if
an individual connection times out, the HttpState instance associated
with it could simply be discarded along with the JSESSIONID session
cookie. 

Hope this helps

Oleg


> 
>        
> ---------------------------------
>  Why delete messages? Unlimited storage is just a click away.


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


Mime
View raw message