Hi Eric,
What exactly do you mean by thread thrashing? Which connection
manager are you using?
Mike
On Mar 19, 2004, at 1:21 PM, Eric Bloch wrote:
Hey there,
I create/destroy http clients but always have them use the same
connection manager.
Will that cause thread thrashing?
Thanks,
Hello Eric,
by using the same connection manager for each HttpClient,
you avoid the biggest penalty for creating new clients. But
still, each new client uses up some heap space, which will
have to be garbage collected sooner or later. There are
state objects, and parameter objecs, and probably
Hello Andre,
you should try to get some real-life data to decide on
connection management. Like a trace on how many
connections are made to which hosts in what frequency.
Then you can verify whether the frequently used hosts
support connection keep-alive or not.
I agree with Michael's assessment
I'm happy to change my code but have a version of my product out there
that does it this way and wanted to make sure it wasn't in need of
immediate patch :-)
-E
Roland Weber wrote:
Hello Eric,
by using the same connection manager for each HttpClient,
you avoid the biggest penalty for
Hello,
use HttpMethod.setDoAuthentication(false). Then,
your application will get the 40x response directly
and can check the returned headers for the auth
scheme and parameters.
If it's basic auth, you should enable preemptive
authentication after providing the credentials, to
avoid unnecessary