HTTP Connection pooling in Apache CXF

流过昼夜 提交于 2019-12-07 01:01:07

问题


I am trying to check whether Apache CXF implements HTTP Connection Pooling? If yes, how can we configure the same. If not, how can we achieve the same?

This thread is little direction towards the same. But it's not clear whether HTTPConduit has a way to set the same or properly configure.

Can anyone guide me on this?


回答1:


Apache CXF uses HTTPUrlConnection internally and relies on java system properties to configure client connection settings.

Two main ones that you can configure are as follows:

  1. http.keepAlive (default: true) - Indicates if persistent connections should be supported. They improve performance by allowing the underlying socket connection to be reused for multiple http requests. If this is set to true then persistent connections will be requested with HTTP 1.1 servers.

  2. http.maxConnections (default: 5) - If HTTP keepalive is enabled (see above) this value determines the maximum number of idle connections that will be simultaneously kept alive, per destination.

Here is a list of all the properties that you can set to configure HTTPUrlConnection

Hope it helps.



来源:https://stackoverflow.com/questions/29941681/http-connection-pooling-in-apache-cxf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!