I'm using httpClient in a webapplication, so I had to use 
MultiThreadedHttpConnectionManager.
In the httpClient docs there's a example how to use 
MultiThreadedHttpConnectionManager:
        MultiThreadedHttpConnectionManager connectionManager = new 
MultiThreadedHttpConnectionManager();
        HttpClient client = new HttpClient(connectionManager);
And there's the sentence "This instance of HttpClient can now be used to 
execute multiple methods from multiple threads".  This works fine! But now I 
want to use one HttpClient for a session. So I have one HttpClient instance per 
session, which of course is also multithreaded.
So my question: Can I use MultiThreadedHttpConnectionManager in this way:
        MultiThreadedHttpConnectionManager connectionManager = new 
MultiThreadedHttpConnectionManager();
        HttpClient client1 = new HttpClient(connectionManager);
        HttpClient client2 = new HttpClient(connectionManager);
        HttpClient client3 = new HttpClient(connectionManager);
        ...
or do I have to use it this way:
        MultiThreadedHttpConnectionManager connectionManager1 = new 
MultiThreadedHttpConnectionManager();
        HttpClient client1 = new HttpClient(connectionManager1);
        MultiThreadedHttpConnectionManager connectionManager2 = new 
MultiThreadedHttpConnectionManager();
        HttpClient client2 = new HttpClient(connectionManager2);
        ...
(client1,...,clientN are used in multiple threads)

Thank you,
Gernot


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

Reply via email to