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

Clarify bean ordering when iterating over an instance #42949

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

rmanibus
Copy link
Contributor

@rmanibus rmanibus commented Sep 2, 2024

cc @mkouba

@rmanibus
Copy link
Contributor Author

rmanibus commented Sep 2, 2024

I also created a discussion in CDI to see if it's relevant to include this in the spec:

jakartaee/cdi#824

This comment has been minimized.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Thanks! I added a few suggestions and will let @mkouba review.

docs/src/main/asciidoc/cdi-reference.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/cdi-reference.adoc Outdated Show resolved Hide resolved
@gsmet gsmet requested a review from mkouba September 3, 2024 06:42
@mkouba mkouba requested a review from manovotn September 3, 2024 07:00
@@ -957,6 +957,27 @@ Alternatively, you can use the `@LookupIfProperty` and `@LookupUnlessProperty` a
}
----

if there is more than one bean that matches the required type and qualifiers and is eligible for injection, it is possible to iterate (or stream) available bean instances.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this paragraph would deserve a separate section with title along the lines of "Sorting beans obtained with programmatic lookup".

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, I'd add it as a separate non-standard feature.
Ideally with a use case (why you might need it) and with an example showing two prioritized beans (and third with no prio?) and what the ordering looks like.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkouba , just updated the PR, WDYT ?

@rmanibus rmanibus force-pushed the bean_ordering_doc branch 2 times, most recently from 035b7b3 to 4c79973 Compare September 16, 2024 23:09
Copy link

github-actions bot commented Sep 16, 2024

🙈 The PR is closed and the preview is expired.

This comment has been minimized.

Copy link

quarkus-bot bot commented Sep 17, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 1870f6c.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@manovotn manovotn merged commit edd0d2b into quarkusio:main Sep 17, 2024
5 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants