Hello everybody.

I'm about starting to use the MultipleThreadedHttpConnectionManager but
after reading the documentation, I have some questions:

- Is it possible to set different values for MAX_HOST_CONNECTION, in a
per HOST basis? My application has to connect to some host and I'd like
to set different values for everyone. Maybe using different HttpClient
objects, each one with a different manager?

- What happens if MAX_HOST_CONNECTION is exceeded and
HttpClient.executeMethod(HttpMethod) is called again? Can I wait until a
connection is released?

- Is MAX_TOTAL_CONNECTION a global value per application or just per
manager? I'd also like to set independent different values depending on
some cases. Is it possible, anyway?

- Is there any trouble in using one HttpClient object with the
multithreaded manager and another one with the simple manager, provided
that both objects will hit different hosts?

AFAIK, HostConfiguration class has nothing to do with the relative path
of an URI, I mean, it just stores information about the host IP and
port. Is it right? 

Finally, I'd like you to tell me if the following code structure is
aproppiate:

My application is composed by a MainThread which starts threads on
demand (ConnectionThreads). Every new ConnectionThread connects to a
given host and do its job.

I want to program a class, ConnectionClass, where I will put a static
HttpClient attribute initialized with the multithreaded manager, and
some methods to use this HttpClient object (connect to a host, get its
response ...)

Everytime a ConnectionThread runs, it will create a ConnectionClass
object to do its job. As HttpClient is static, it will be created just
once. 

I want every ConnectionThread to share the same HttpClient, so that I
can take advantage of the multithreaded manager and its connection pool.

Thank you very much.

        Juan Pedro López





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

Reply via email to