> > Feasible approach is to have one monitor thread checking on the status
> > of active connections or/and processing incoming connections, and a
> > number of worker threads in a shared pool to do the actual work.
> 
> Actually since probably most people using httpclient with many
> connections would need that, would it make sense to have it
> shared somewhere, for example in httpclient?
> 

I assume you are developing some kind of HTTP proxy, since you have
HttpClient running inside a servlet container. While not being entirely
impossible (I have one serving a population of a large Swiss canton),
HttpClient 2.x and 3.x have not been specifically designed to be used in
such a manner. My guts tell me that it might involve quite a few nasty
hacks if to be made truly generic and reusable. In my option it is just
not worth the trouble and will not bear results generic enough to be
useful in most of scenarios.

We are planning to embark on a fundamental redesign of HttpClient in a
not so distant future (past 3.0b1 I'd say). Our intent is to turn
HttpClient into a generic HTTP toolkit which can be used to rapidly
assemble HTTP agents, proxies or embedded lightweight servers. 

At that point we will probably seriously consider using NIO and provide
some sort of thread management/connection management classes or use an
external library for that end.   

But first things first, and one thing at a time

> commons/httpclient/apidocs/org/apache/commons/httpclient/HttpClient.html#setTimeout(int)
>  
> 
> Yes, we're already using that (and connection timeouts as well).
> We're just in trouble when the post never finishes, but actually
> the server is very slow (if it sends one byte per second for
> example, but on a regular basis) or goes mad.

Basically what you are talking about is ability to abort execution of
HTTP methods. Consider using HttpClient 3.0a2 which provides such
capability. You'll have to add a little code to handle timing of method
execution, which should not be that difficult

Oleg

***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access 
to this email by anyone other than the intended addressee is unauthorized.  If you are 
not the intended recipient of this message, any review, disclosure, copying, 
distribution, retention, or any action taken or omitted to be taken in reliance on it 
is prohibited and may be unlawful.  If you are not the intended recipient, please 
reply to or forward a copy of this message to the sender and delete the message, any 
attachments, and any copies thereof from your system.
***************************************************************************************************

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

Reply via email to