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?
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:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With