Hi,

I will be writing a gateway which will invoke URLs in
behalf of several threads and they will return the
content. Each thread needs to invoke different URLs
with different context (cookies, etc).

It looks like right way of doing this is to
instantiate the HttpClient once with
MultiThreadedHttpConnectionManager and each thread
will use httpClient.executeMethod on this HttpClient
instance. Or the other alternative is to instantiate
one object for each thread, and keep calling
executeMethods on them. 

However, since you can set the state of the
HttpClient, I was wondering if I can use the
HttpClient for iterative http invocations with
different contexts? I mean, is there an in-memory
state other than the HttpState that is preserved
between these invocations? Would it be enough to
create an HttpState and GetMethod for each call, and
set it before calling executeMethod? 

Shortly, what is the optimum mechanism for this
functionality?

TIA...



        
                
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861 

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

Reply via email to