Repository navigation
[RESTEASY-3754] & [RESTEASY-3755] Update CDI support - #4933
Conversation
98c2bd3 to
a8ecb7e
Compare
|
We need to decide if we should create a 7.1 version this goes into or if we're okay with this going into 7.0.3. It's kind of a big change, but should be backwards compatible for the most part. However, I'm seeing issues in WildFly where modules within WildFly need an explicit dependency on What I want to avoid is supporting a long term 7.0 if we do a 7.1, but that might be the way we need to go. This CDI integration will really help user to be able to start migrating to using CDI now rather than having to wait for Jakarta REST 5.0. |
a8ecb7e to
df5d821
Compare
…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]>
df5d821 to
a392396
Compare
a392396 to
55d44ef
Compare
55d44ef to
28dbfb0
Compare
|
I've decided to keep this in 7.0 with the ability to disable it. The default is what we're referring to as enhanced CDI is enabled by default. This will be back-ported to 6.2 as well, but for 6.2 we will disable it by default. |
28dbfb0 to
95f2c8d
Compare
… 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]>
95f2c8d to
6590a24
Compare
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.