Configure Http connection pooling in Apache CXF
<p>I'm using Apache camel 2.16.0 and CXF 3.1.2</p>

<p>How can i configure connection pooling (in cxf.xml) for all the http calls so that it can reuse the existing http connection instead of create a new connection every time ?</p>

<p>I see too may TIME_WAIT, CLOSE_WAIT and FIN_WAIT2 for each request, How can i close idle connections ?</p>

<pre><code>&lt;bean id="http" class="org.apache.camel.component.http.HttpComponent"&gt;
        &lt;property name="camelContext" ref="camel_context" /&gt;
        &lt;property name="httpConnectionManager" ref="myHttpConnectionManager" /&gt;
    &lt;/bean&gt;

    &lt;bean id="myHttpConnectionManager"
        class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager"&gt;

        &lt;property name="params" ref="myHttpConnectionManagerParams" /&gt;
    &lt;/bean&gt;

    &lt;bean id="myHttpConnectionManagerParams"
        class="org.apache.commons.httpclient.params.HttpConnectionManagerParams"&gt;
        &lt;property name="connectionTimeout" value="20000" /&gt;
        &lt;property name="soTimeout" value="20000" /&gt;
        &lt;property name="defaultMaxConnectionsPerHost" value="5" /&gt;
        &lt;property name="maxTotalConnections" value="10" /&gt;
    &lt;/bean&gt;
</code></pre>

<p>seems like maxTotalConnections isn't working !
maxTotalConnections is 10 but when i do a load test i can see more than 230 ESTABLISHED connections.. not only this
all the properties like connectionTimeout, soTimeout, defaultMaxConnectionsPerHost are all ignored !</p>

<p>any help is appreciated..</p>