Hi Oleg, all,

I had another disquieting thought about params.setDefaults()
today. Is it safe for use in a complex, multithreaded setting
in the first place? Consider the following two scenarios:

a) An application creates a set of parameters to be used
for requests in special cases. Several such requests are
created and initialized with .setParams() and the same
params object. The framework calls .getParams().setDefaults()
for each request, at unspecified times.

b) An application creates one connection manager, to be
shared by multiple HttpClient instances. Each client
tries to establish a params hierarchy
  client -> conn mgr -> connection (or -> request?)
by calling params.setDefaults() on the same conn mgr params.

Actually, I'm wondering how HttpClient 3.x handles the
second scenario. Is there some synchronization so that
the params hierarchy remains fixed while it is accessed?
Or is it documented that "the last client wins"? Or did I
mix up the class hierarchy with the "defaults" hierarchy?
http://jakarta.apache.org/commons/httpclient/preference-api.html#HTTP_parameter_hierarchy


cheers,
  Roland

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

Reply via email to