-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
4.0.0.Beta7
-
None
This is a follow up for the issue RESTEASY-2084.
The JAX-RS specification states that all providers denoted with @Provider annotation should be registered by the JAX-RS runtime. The ClientRequestFilter and ClientResponseFilter have been covered by RESTEASY-2084. However there are more annotations that should be processed for client instances:
- MessageBodyReader (constrained to client)
- MessageBodyWriter (constrained to client)
- AsyncClientResponseProvider
- ReaderInterceptor (constrained to client)
- WriterInterceptor (constrained to client)
- DynamicFeature (constrained to client)
These providers should be probably also registered with every new client instance. However according to testing done by mkopecky@redhat.com this is not true even for reference implementation Jersey.
This is potentially breaking change as RESTEasy currently registers provider that can be restricted to client or server and doesn't *use @ContrainedTo annotation to actually constrain its usage to both client *and server. For now for each new client a new provider factory is created and thus loosing all scanned information (client providers can still be registered by service loader). Proposed change would make @Provider annotation work on all clients (as it is intended by the specification) and so may introduce problem if this behavior is not expected.
- relates to
-
RESTEASY-2084 @Provider annotation doesn't work with ClientRequestFilter
- Resolved
-
RESTEASY-2269 AsyncClientResponseProvider is not used
- Resolved
-
RESTEASY-2270 Client dynamic features should not be supported
- Closed