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

Specify @Priority on producers #699

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Nov 9, 2023

Fixes #556

@Ladicek Ladicek added this to the CDI 4.1 milestone Nov 9, 2023
@Ladicek Ladicek requested a review from manovotn November 9, 2023 16:54
@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 9, 2023

Submitting as a draft because I need to think a little more about this formulation:

To determine the priority of a producer method or field, the @Priority annotation on the producer method or field is considered first.
If the producer method or field does not declare the @Priority annotation, the @Priority annotation declared on the bean class is used.

The question is: should this be a general principle, or should this only be taken into account during ambiguity resolution? (The CDI specification doesn't use the priority for anything else, but I know of implementations that do use the priority value of beans e.g. for ordering.)

@manovotn
Copy link
Contributor

Submitting as a draft because I need to think a little more about this formulation

Can we swap this from draft to ready for review?
I think the current formulation is precise and would work fine.

@Ladicek Ladicek marked this pull request as ready for review November 28, 2023 13:34
@Ladicek
Copy link
Contributor Author

Ladicek commented Nov 28, 2023

Yeah, I totally forgot I updated this PR with a more targeted text.

@manovotn manovotn merged commit 17864f3 into jakartaee:main Nov 28, 2023
2 checks passed
@Ladicek Ladicek deleted the producer-priority branch November 28, 2023 14:38
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.

@Priority on producers
3 participants