In an attempt to tame the connection pooling code, a new property has been added:
This is a boolean property and the default is true. This is passed directly on to the commons framework and as such I have stolen a comment from the commons code (HttpClientHandler.OPTION_DISABLE_CONNECTION_STATE) to explain what it does:
This option only applies when HTTP_CLIENT_HANDLER_REUSE_CONNECTIONS_ENABLED is set to true.
Setting this to true can help with performance in the case where a client certificate is being used as it will change the Apache HTTP Client default behaviour which is to not allow connection reuse when a client certificate is being used for authentication. Since the client certificate is defined at the client level, all requests to the same target will be sharing the same client certificate so enabling this should not be an issue. This option is not enabled by default to ensure that there is still control over when it is applied. In the context of Apache HTTP Client and stateful requests:
There are cases when HTTP connections are created with a particular user identity or within a particular security context and therefore cannot be shared with other users and can be reused by the same user only. Examples of such stateful HTTP connections are NTLM authenticated connections and SSL connections with client certificate authentication.