Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd JettyResourceFactory [SPR-17179] #21715
Closed
Comments
This was referenced Jan 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rossen Stoyanchev opened SPR-17179 and commented
Currently the default constructor of
JettyClientHttpConnector
creates a newHttpClient
instance. Arguably this is a little too easy, since unless the connector is re-used acrossWebClient
instances, each will be created with its own resources.We should instead provide help with creating a Spring-managed Jetty
HttpClient
instance that can then be shared among clients, and whose resources could also then be shared with a Jetty server (e.g. with WebFlux in non-blocking mode).The proposed changes are to remove
SmartLifecycle
fromJettyClientHttpConnector
and create aJettyHttpClientFactory
instead hat manages anHttpClient
instance within a SpringApplicationContext
. The connector would then accept aJettyHttpClientFactory
or anHttpClient
instance.This would also be consistent with the changes for the
ReactorClientHttpConnector
as part of #21501.Affects: 5.1 RC1
Issue Links:
Referenced from: commits 0dd9e8c, 1eb06fc