Repository navigation
[RESTEASY-3754] & [RESTEASY-3755] Update CDI support - #4937
Merged
Merged
Conversation
…rvices with the same priority. Also some minor performance clean up. https://redhat.atlassian.net/browse/RESTEASY-3754 Signed-off-by: James R. Perkins <[email protected]>
… CDI. Ensure invalid CDI resource beans are ignored by the CDI extension and processed by RESTEasy. https://redhat.atlassian.net/browse/RESTEASY-3755 Signed-off-by: James R. Perkins <[email protected]>
jamezp
force-pushed
the
cdi-param-qualifiers-6.2
branch
from
July 27, 2026 19:20
4056b17 to
f086afa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream: #4933
RESTEASY-3755
Enable injection of @*Param annotated parameters with CDI. Ensure invalid CDI resource beans are ignored by the CDI extension and processed by RESTEasy.
CDI Integration Changes
A new CDI extension,
ResteasyParamCdiExtension, registers Jakarta REST parameter annotations (@CookieParam,@FormParam,@HeaderParam,@MatrixParam,@PathParam,@QueryParam, and@BeanParam) as CDI qualifiers. This allows Jakarta REST resources to receive parameter values via CDI injection — including constructor injection — without requiring a public no-arg constructor (providedthe class is still proxyable).
For any proxyable Jakarta REST resource or provider:
@Injectis implicitly added to@Context-annotated fields, setter methods, and constructors (ResteasyCdiExtension)@Injectis implicitly added to@*Param-annotated fields, setter methods, and constructors (ResteasyParamCdiExtension)ParameterExtractorsResources that are not proxyable (final class, final methods, or no non-private no-arg constructor) are excluded from CDI management and handled by RESTEasy directly. This resolves the deployment regression in RESTEASY-3752 where resources with only a parameterized constructor would fail.
Other Changes
StringParameterConverter— new extraction/conversion system used by the CDI synthetic producersCdiProxyUnwrapper— utility for unwrapping Weld and OpenWebBeans client proxies via reflective method handlesPropertyInjectorImpl— skips @Inject-annotated members to avoid double injection when CDI is managing the beanRESTEASY-3754
This fixes a bug in the
PriorityServiceLoaderwhich did not include all services if the services had the same priority.