Comments (12)
What shall vendors do that currently are JAX-RS compatible, but that do not have replaceable backends, but just one hardcoded backend? Shall they not be JAX-RS compatible anymore or do you pay their costs for reworking their kernel to support replaceable backends?
Having said that, wouldn't it be enough to mandata that IF a vendor supports replaceable backends, then they MUST support predefined properties to configure them?
from rest.
I hope the spec provider can provide their HttpConnector
implementations freely, but at least give an implementation based on JDK 11 HttpClient, and make it the default implementation(for the end users, we do not need to add more dependencies).
The end user can also implement its own HttpConnector impl to replace the one in the provider. For example, in one project, we use OkHttp as an HTTP client to handle all client cases, but this Jaxrs provider does not provide an OKHttp version, to align with our codes and we do not want to introduce new dependencies, we can impl a HttpConnector based on OkHttp.
from rest.
@hantsy Can you try to prototype some way to hook in the connector? It is not clear to me what simply new JdkHttpClientHttpConnector(httpClient);
would do to deliver the response. Do you mean some static approach or some other way?
from rest.
I hope the spec provider can provide their
HttpConnector
implementations freely, but at least give an implementation based on JDK 11 HttpClient, and make it the default implementation(for the end users, we do not need to add more dependencies).The end user can also implement its own HttpConnector impl to replace the one in the provider. For example, in one project, we use OkHttp as an HTTP client to handle all client cases, but this Jaxrs provider does not provide an OKHttp version, to align with our codes and we do not want to introduce new dependencies, we can impl a HttpConnector based on OkHttp.
This imposes strong restrictions on how a JAX-RS implementation is actually designed -- something that an API shall never do.
from rest.
something that an API shall never do.
Like the Jakarta Rest spec, there are several impls, such as Eclipse Jersey, Resteasy etc.
It is not just an API, in the end user's mind, it is a framework, that should be provide more flexible options.
from rest.
@hantsy Can you try to prototype some way to hook in the connector? It is not clear to me what
simply new JdkHttpClientHttpConnector(httpClient);
would do to deliver the response. Do you mean some static approach or some other way?
The new Spring 6.x provides a RestClient
, and Spring also provided a WebClient
since 5.x. Unlike the former client tools(eg. restTemplate), they offer a configurable option to switch the background HTTP Client engine and allow developers to configure HTTP Message codecs details.
Check the following docs for more details.
- The
ClientHttpRequestFactory
used to build aRestClient
(Blocking API), https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/client/ClientHttpRequestFactory.html - The
ClientHttpConnector
used to build aWebClient
(Reactive API), https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/client/reactive/ClientHttpConnector.html
from rest.
It is not just an API, in the end user's mind, it is a framework, that should be provide more flexible options.
Jakarta REST is not a framework, it is just an API.
from rest.
I think if we adopt this idea, then there should be a separate Jakarta subprojekt for defining such an API that we can build upon.
from rest.
Related Issues (20)
- Compatibility Certification request for Eclipse Jersey 4.0.0-M1 for JDK 17 (Jakarta REST 4.0)
- Compatibility Certification request for Eclipse Jersey 4.0.0-M1 for JDK 21 (Jakarta REST 4.0)
- Obtaining client address without HttpServletRequest HOT 7
- FactoryFinder does not respect the SystemProperty of factoryId HOT 5
- jakarta-restful-ws-tck 3.1.5 missing on Maven Central HOT 2
- Steps to finalize the release of Jakarta RESTful Web Services 4.0 HOT 11
- Remove SecurityManager usage and references HOT 2
- Maven wrapper too old for build HOT 1
- Sources aren't published into maven central HOT 4
- Form class missing equals impl HOT 2
- TCK requires specific response header case HOT 13
- Support new Java date/time types for preconditions/lastModified HOT 2
- Clarification: Reconfiguration of Client HOT 8
- Add application/yaml MediaType HOT 7
- Entity Provider for java.nio.file.Path
- Client Should Support HTTP Patch Method HOT 8
- Remove xml_binding dependency from TCK
- TCK Challenge: ee.jakarta.tck.ws.rs.ee.rs.container.requestcontext.JAXRSClientIT.containsHeaderStringTest uses header "Header3" causing getHeadersTest to incorrectly fail in some implementation.
- Add ReactiveStream/JDK 9 Flow Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rest.