Skip to content

Reverts the enhanced CDI integration added in RESTEASY-3755, which should not have gone into a maintenance release, and backports bug fixes from main - #5129

Merged
jamezp merged 9 commits into
resteasy:7.0from
jamezp:backports-7.0
Nov 5, 2026

Conversation

@jamezp

@jamezp jamezp commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Reverted

  • RESTEASY-3822: Revert the enhanced CDI integration added by RESTEASY-3755
  • Reverts RESTEASY-3755 (dev.resteasy.cdi.enhanced.enabled, CDI injection of @*Param values and of @Context members through CDI), including its CI job
  • Reverts RESTEASY-3797, the producers for the Jakarta Servlet types, which were only required by RESTEASY-3755. Their @Default beans caused a WELD-001409 ambiguous resolution for applications which provide their own bean for one of these types
  • Reverts the change for RESTEASY-3790 which disabled RESTEasyParamCdiTest
  • Restores the fix for RESTEASY-3752, which was part of the RESTEASY-3755 commit, with a new test

Release note

CDI injection of @*Param values, and of @Context members through CDI, controlled by dev.resteasy.cdi.enhanced.enabled, has been removed. It was added in error in a maintenance release and is available in RESTEasy 8.0. HttpServletResponse and ServletConfig can no longer be injected with @Inject; use @Context.

Fixes

  • RESTEASY-3817: Push and restore the Configuration for a client invocation
  • RESTEASY-3819: Resolve the bean of the type itself when a subclass of a CDI managed resource is also a bean
  • RESTEASY-3821: Create the instance through the InjectorFactory in ResourceContext.getResource()
  • RESTEASY-3824: Remove the global ResteasyProviderFactory installed by a deployment which failed to start

Testsuite

  • Simplify the integration testsuite and fix bootable JAR tests

- Run a single WildFly server; move RESTEASY-2171 coverage to a unit test
- Replace name-based surefire filtering with `@Tag` groups
- Use literal wildfly-maven-plugin coordinates so the bootable JAR is packaged
- Skip tests requiring RESTEasy 8 CDI behavior via `@RequiresModule`

Signed-off-by: James R. Perkins <[email protected]>
(cherry picked from commit 513fbba)
Signed-off-by: James R. Perkins <[email protected]>
@jamezp
jamezp requested a review from a team as a code owner November 4, 2026 23:33
jamezp and others added 8 commits November 4, 2026 16:49
…l we can get a fix in."

This reverts commit 5e870b5. RESTEasyParamCdiTest failed because of RESTEASY-3755, which is reverted as well.

https://redhat.atlassian.net/browse/RESTEASY-3822

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
…nnotated parameters with CDI. Ensure invalid CDI resource beans are ignored by the CDI extension and processed by RESTEasy."

This reverts commit 6590a24. The enhanced CDI integration changed how RESTEasy and CDI interact in ways which
caused issues, e.g. RESTEASY-3790. Fixing them requires the CDI integration of RESTEASY-3807, which is part of
RESTEasy 8.0 and Jakarta REST 5.0.

The later changes to the same files from RESTEASY-3793, RESTEASY-3794, RESTEASY-3797 and RESTEASY-3803 are kept.

Release note: CDI injection of @*Param values, and of @context members through CDI, controlled by
dev.resteasy.cdi.enhanced.enabled, has been removed. It was added in error in a maintenance release and is available
in RESTEasy 8.0. On 7.0 it was enabled by default; on 6.2 only applications which set
dev.resteasy.cdi.enhanced.enabled=true are affected.

https://redhat.atlassian.net/browse/RESTEASY-3822

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
… on the required Servlet types when Servlet is present."

This reverts commit b375a58. The producers for the Jakarta Servlet types were only required for the enhanced CDI
integration of RESTEASY-3755, which is reverted. The @default beans they registered caused an ambiguous resolution,
WELD-001409, for applications which provide their own bean for one of these types.

https://redhat.atlassian.net/browse/RESTEASY-3822

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
…ation

Push and restore the Configuration, as well as the Providers, for a
client invocation, so a provider shared by the client and server sees
the client's Configuration while the client invokes it.

https://redhat.atlassian.net/browse/RESTEASY-3817

Signed-off-by: James R. Perkins <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…f a CDI managed resource is also a bean

When a subclass of a CDI managed resource is also a bean, resolving the
bean of the resource class was ambiguous. Prefer the bean whose bean
class is the type, or an alternative.

https://redhat.atlassian.net/browse/RESTEASY-3819

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
…sourceContext.getResource()

Create the constructor injector from the class with the InjectorFactory,
rather than picking the constructor first, so a CDI bean whose only
constructor is an @Inject constructor with parameters not annotated with
@context can be created.

https://redhat.atlassian.net/browse/RESTEASY-3821

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
…y a deployment which failed to start

A failed start never reaches stop(), so the deployment's factory stayed
the global instance and was used by other deployments, e.g. their REST
clients.

https://redhat.atlassian.net/browse/RESTEASY-3824

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
… RESTEASY-3755

The fix for RESTEASY-3752 was part of the RESTEASY-3755 commit. Do not
add a resource, provider or Application class which cannot be proxied to
the bean container, so RESTEasy creates it rather than failing the
deployment when CDI does not register it as a bean. A class is only
proxyable if it has a non-private no-arg constructor.

https://redhat.atlassian.net/browse/RESTEASY-3822

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: James R. Perkins <[email protected]>
@jamezp
jamezp merged commit 75158b8 into resteasy:7.0 Nov 5, 2026
9 checks passed
@jamezp
jamezp deleted the backports-7.0 branch November 5, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant