-
Notifications
You must be signed in to change notification settings - Fork 112
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 explicit CDI bean discovery mode #874
specify explicit CDI bean discovery mode #874
Conversation
https://ci.eclipse.org/jakartaee-tck/job/10/job/eftl-jakartaeetck-run-100/9/ reproduced the failure that I saw locally that led to me creating the PR. The GlassFish server.log is contained here. The exception that occurs is pasted below:
|
The remaining question is how does one grep for TCK source that will have this problem? |
The remaining question is how does one grep for TCK source that will have this problem? Maybe search for beans.xml that doesn't have |
Any empty beans.xml deployment will need to be looked at for whether it should be updated to use the bean-discovery-mode="all", or look for @Inject usage and evaluate the bean being injected. In this com.sun.ts.tests.servlet.ee.platform.cdi package tree, the TCKTestBean and BeanManager are being injected, and the TCKTestBean could just be updated to use @ApplicationScoped to avoid having to change the other beans.xml files. |
I created a general issue for this and will make a pass at updating all CDI bean usage, #876 |
…n-discovery-mode="all", either should address the new requirement for issues#876 Signed-off-by: Scott Marlow <smarlow@redhat.com>
e7e0d6f
to
8150b90
Compare
Added @ApplicationScoped to TCKTestBean and tested via https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/servlet_explicit_cdi_archive_2/2/testReport which passed tests:
|
Signed-off-by: Scott Marlow smarlow@redhat.com
Related Issue(s)
jakartaee/cdi#500 change (see blog)
Quoting from the blog:
We can now ask what is
bean defining annotations
? To answer that, we can look at the CDI 3.0 Spec which states:Describe the change
The default Discovery Mode for empty beans.xml is implicit bean archives, so we need to switch to explicit bean archives mode.
https://jakarta.ee/specifications/cdi/3.0/jakarta-cdi-spec-3.0.html#bean_defining_annotations