thanks. But can I share same HttpClient accross threads or do I need to synchronize for each thread. I am still not sure why was I getting errors when I tries using one instance of HttpClient accross threads.
Another question I have is can I use same multithreadedConnection manager for different instances of HttpClient? I am assuming multithreadedConnectionManager is thread safe and could be used in servlet env. On Wed, Oct 15, 2008 at 10:44 AM, Christine <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-15 at 10:40 -0700, Mohit Anchlia wrote: >> >> Just one. One can make several HttpClient instances share the same >> >> connection manager, though, (which is not recommended). >> >> Why is multiple HttpClients and one connection manager not >> recommended? I tried using one HttpClient in servlet accross all the >> threads but started getting errors. It looks like I can't use one >> instance of HttpClient shared accross multiple threads at the same >> time > > Wouldn't it be easier to have one service in a separate thread that > handles all http so you can have one HttpClient that is used by all > threads? > > Christine > > >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] > -- > dagdag is just a two character rotation of byebye > www.christine.nl > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
