Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnnotationFullTests adds resource definitions with qualifiers on a CDI bean #491

Merged
merged 2 commits into from
May 10, 2024

Conversation

OndroMih
Copy link
Contributor

@OndroMih OndroMih commented May 8, 2024

The servlet AnnotationServlet turned into an Dependent CDI bean so that it's scanned by a CDI extension, which can then read the definitions from the annotations.

I decided to use @Dependent scope because Servlet spec version 3.0 explicitly forbids other CDI scopes for servlets. Some servers still abide this even though it seems this restriction was removed in newer Servlet spec versions. Concurrency TCK should not contain any assertions for other specs, so I use widely accepted @Dependent.

Fixes #489

This is because Servlet 3.0 explicitly forbids using other CDI qualifiers on servlets. Although it seems that this restriction was removed, some servers still abide it.
Fixes jakartaee#489
Signed-off-by:Ondro Mihalyi <[email protected]>
Copy link
Contributor

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to use @Dependent scope because Servlet spec version 3.0 explicitly forbids other CDI scopes for servlets. Some servers still abide this even though it seems this restriction was removed in newer Servlet spec versions. Concurrency TCK should be contain any assertions for other specs, so I use widely accepted @Dependent.

We shouldn't be concerned with something from Servlet 3.0 that no longer applies in EE 11, but @Dependent is fine as well. Approving.

You can go ahead and cancel the similar pull for this same fix that I created earlier after Arjan had assigned the issue to me, and which I misinterpreted as being asked to put the change in. It makes more sense to have you make the TCK update because you can confirm that you are passing the TCK with it.

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.

Adjust tests that use qualifiers with an *Definition annotation that is put on a class not scanned by CDI
3 participants