-
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
BeanContainer#getInjectableReference should probably be on BeanManager instead #568
Comments
Technically, we don't "allow Lite implementations to support |
True, I was to lazy to search for exact wording in the spec :) |
… Full We previously [1] moved the `getInjectableReference()` from the `BeanContainer` interface to the `BeanManager` [2], but did not update the specification text accordingly. Thus, the method is specified in the CDI Lite part of the spec, but it in fact belongs to CDI Full. This commit moves the spec text around to fix that. Additionally, this commit removes the declaration of `resolveObserverMethods()` from `BeanManager`, because that just overrides the same declaration that is present on `BeanContainer`. Finally, this commit moves the declaration of `getInjectableReference()` from the end of the `BeanManager` source code to the beginning, for symmetry with the `BeanContainer` declaration and to restore the previous layout. [1] jakartaee@520bad1 [2] jakartaee#568
… Full We previously [1] moved the `getInjectableReference()` from the `BeanContainer` interface to the `BeanManager` [2], but did not update the specification text accordingly. Thus, the method is specified in the CDI Lite part of the spec, but it in fact belongs to CDI Full. This commit moves the spec text around to fix that. Additionally, this commit removes the declaration of `resolveObserverMethods()` from `BeanManager`, because that just overrides the same declaration that is present on `BeanContainer`. Finally, this commit moves the declaration of `getInjectableReference()` from the end of the `BeanManager` source code to the beginning, for symmetry with the `BeanContainer` declaration and to restore the previous layout. [1] 520bad1 [2] #568
BeanContainer
API currently housesgetInjectableReference(InjectionPoint ij, CreationalContext<?> ctx)
which was originally onBeanManager
.After some discussion with @Ladicek we arrived at the conclusion that this doesn't make much sense.
In Lite, you don't have access (via
BeanContainer
) to programmatic creation ofInjectionPoint
because that's based off the former metadata model (AnnotatedType
and friend). You cannot store them from extensions either so your means of getting hold of them are very limited. Possibly only to creating a class directly implementing an IP which, again, requires usage of theAnnotated*
metamodel.Therefore, we should move this method back to
BeanManager
.Note that recently we changed the wording so that implementations in Lite are allowed to support
BeanManager
in some limited form as well meaning that if this functionality turns out to be needed, it can still be implemented without breaking spec compatibility.The text was updated successfully, but these errors were encountered: