Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JettyResourceFactory [SPR-17179] #21715

Closed
spring-projects-issues opened this issue Aug 14, 2018 · 0 comments
Closed

Add JettyResourceFactory [SPR-17179] #21715

spring-projects-issues opened this issue Aug 14, 2018 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 14, 2018

Rossen Stoyanchev opened SPR-17179 and commented

Currently the default constructor of JettyClientHttpConnector creates a new HttpClient instance. Arguably this is a little too easy, since unless the connector is re-used across WebClient 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 from JettyClientHttpConnector and create a JettyHttpClientFactory instead hat manages an HttpClient instance within a Spring ApplicationContext. The connector would then accept a JettyHttpClientFactory or an HttpClient 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants