Tomcat Server Dennis and I do configure the KeepAliveTimeout configurations,
keepAlive system properties for JRE. It did not work. Tried with a simple
webclient call and noticed, CXF is creating new connections for every
request tried with simple JaxRS WebClient and below is the code snippet -

JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
bean.setAddress("https://<url>");
bean.setProperties(Collections.singletonMap(
                                org.apache.cxf.message.Message.MTOM_ENABLED, 
(Object) "true"));
WebClient client = bean.createWebClient();
HTTPConduit conduit = WebClient.getConfig(client).getHttpConduit();
conduit.getClient().setReceiveTimeout(45000);
conduit.getClient().setConnectionTimeout(45000);
conduit.getClient().setConnection(ConnectionType.KEEP_ALIVE);
Response response = client.get();
System.out.println(response.getStatus());

I did a netstat in the server with the above code and noticed new TCP
connections are getting created for every request. Looks like something I'm
missing in the above code.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-not-honoring-the-Keep-Alive-connections-tp5781561p5781598.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to