-
Notifications
You must be signed in to change notification settings - Fork 78
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
Define how InjectionPoint
works when a bean is obtained via CDI.current()
#779
Comments
Correct observation. I agree that |
I took the liberty of creating a CDI 5.0 milestone and assigning this issue to it. This is something that should be specified IMHO. Of course, my preference would be to specify it the way we do it :-), but that's TBD. |
Yea, this is sensible, Weld does this too. |
My 2cts would be that it can be to add a |
The InjectionPoint Javadoc says this:
This doesn't cover the case where a bean is looked up using
CDI.current().select(...).get()
because there is no injection point for the Instance.For example if I have a qualifier:
and a managed bean class:
I can inject this bean like this and get its qualifiers:
However, I don't think it's defined what happens when I do this:
Would it make sense to define how the
InjectionPoint
should work here? I don't think there's any sensible value forgetAnnotated()
,getBean()
orgetMember()
, butgetQualifiers()
andgetType()
would still be helpful in this scenario.This came to my attention because the Jakarta Batch spec gave an example of looking up a bean like this but getting the injection point isn't supported on open web beans for a bean obtained via
CDI.select()
: jakartaee/batch-tck#69The text was updated successfully, but these errors were encountered: