Set keep-alive in HttpClient in Spring xml -
we using apache httpclient library manage pool of connections java remoting.
looking @ tcp traffic, appears keep-alive flag not being set, , our firewall chopping off these connections.
our spring config looks this:
<bean name="httpclient" class="org.apache.commons.httpclient.httpclient"> <property name="timeout" value="${pdccreditcheck.maxtimeout}"/> <property name="httpconnectionmanager" ref="remotingconnectionmanger"/> </bean> <bean id="remotingconnectionmanger" class="org.apache.commons.httpclient.multithreadedhttpconnectionmanager"> <property name="maxtotalconnections" value="5"/> <property name="maxconnectionsperhost" value="5"/> </bean>
i hoping there might flag set here, corresponds tcp keep-alive flag.
any appreciated.
you might try use jvm flag http.keepalive. more info:
http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
Comments
Post a Comment