On Tue, 2007-01-09 at 17:26 +0530, Jagadeesh wrote: 
> Hi All,
> 
>  
> 
> I have a pretty unique problem where I need to serialize the HTTPClient
> object. In my application I have to access an API server which uses REST
> protocol and I have to maintain the session for each and every user. So I
> kept the HTTPClient object in the HTTP session and now when I am trying to
> use load-balancing and clustering, as expected I am running into problems
> with serializing the HTTPClient object which is stored in the HTTP session.
> 
>  
> 
> I would like to know whether there are any workarounds to fix this.
> 

Jagadeesh,

There is no point to serialize the whole damn thing. HttpClient keeps
all its state in a single instance of HttpState class.

Just extend the HttpState class, make it implement Serializable and pass
an instance of this class to HttpClient along with the request to be
executed. Re-use stateless instance(s) of HttpCkient as you see fit.

Hope this helps

Oleg


>  
> 
> Thanks
> 
> Jugs
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to