jakartaee-platform
jakartaee-platform copied to clipboard
Consider allowing "special" component/spec-defined classes to be automatically treated as CDI beans, without need for BDA
UPDATE - 2021-12-16
After opening this issue and adding these comments on 12/2, we decided to keep the poll going thru 12/15. I closed it today on 2021-12-16. I updated the data below, (previously 63, now 71 responses). Since the relative ranking didn't substantially change, I'm not going to bother the mailing lists with another email now.
QUESTION
As discussed in the Platform dev ML, (after being discussed in the Batch ML and the REST ML), there is an idea going forwards to possibly replace/reconsider the behavior defined in https://github.com/eclipse-ee4j/jakartaee-platform/blob/master/specification/src/main/asciidoc/platform/ResourcesNamingInjection.adoc#a651 with something more like "load every special spec-defined class as a CDI Bean".
That still leaves the exact definition, details, feasibility etc. TBD.
POLL RESULTS
After discussion we polled the Jakarta community (references below) with results:
Total responses: 71
Option | Description | Percentage % | Votes |
---|---|---|---|
Option 1 | Adopt the current/legacy Platform spec approach | 20% | 14 |
Option 2 | Formalize the Batch Status quo | 21% | 15 |
Option 3 | A new direction - make everything a CDI bean | 59% | 42 |
SUGGESTED ACTION
I suggest if this is decided to be a useful approach it should be discussed and validated at the platform level rather than being left to the individual specs only, for some future (post-EE 10) platform release.
REFERENCES
For background on the issues, discussion, and poll options see):
https://www.eclipse.org/lists/jakartaee-platform-dev/msg02929.html https://www.eclipse.org/lists/jakartaee-platform-dev/msg02974.html https://docs.google.com/document/d/1s6bhfaDm2GyBfuggFnLz9Zo3fdgVi0gtTFlFZiPwriU
Probably related to https://github.com/eclipse-ee4j/mojarra/pull/5238
Other specs need to be able to activate CDI, either programmatically, or by adding rules about which annotations are bean defining.