I am using httpClient (4.1.x) in a multi-threaded environment. I am using the ThreadSafeClientConnManager class to create a connection pool of persistent connections, which different threads invoke as and when requests are received by my web server.
HttpClient has a MAX_CONNECTIONS parameter and a MAX_CONNECTIONS_PER_ROUTE parameter that can be configured depending upon the number of concurrent requests that need to be serviced.
My question is regarding the behavior of the ThreadSafeClientConnManager when the MAX_CONNECTIONS limit is reached. Support MAX_CONNECTIONS have been opened and they are all busy, i.e being used by other threads. Now, a new request, by a new thread is made to the connection pool for a connection. Now, does it (ConnectionPool) ignore this request OR does the invocation block the calling thread and it waits until the connection manager is able to find a free connection?