spring - Configure Http connection pooling in Apache CXF -


i'm using apache camel 2.16.0 , cxf 3.1.2

how can configure connection pooling (in cxf.xml) http calls can reuse existing http connection instead of create new connection every time ?

i see may time_wait, close_wait , fin_wait2 each request, how can close idle connections ?

<bean id="http" class="org.apache.camel.component.http.httpcomponent">         <property name="camelcontext" ref="camel_context" />         <property name="httpconnectionmanager" ref="myhttpconnectionmanager" />     </bean>      <bean id="myhttpconnectionmanager"         class="org.apache.commons.httpclient.multithreadedhttpconnectionmanager">          <property name="params" ref="myhttpconnectionmanagerparams" />     </bean>      <bean id="myhttpconnectionmanagerparams"         class="org.apache.commons.httpclient.params.httpconnectionmanagerparams">         <property name="connectiontimeout" value="20000" />         <property name="sotimeout" value="20000" />         <property name="defaultmaxconnectionsperhost" value="5" />         <property name="maxtotalconnections" value="10" />     </bean> 

seems maxtotalconnections isn't working ! maxtotalconnections 10 when load test can see more 230 established connections.. not properties connectiontimeout, sotimeout, defaultmaxconnectionsperhost ignored !

any appreciated..


Comments