Skip to content

Note on @CDIComponent with regard to Jakarte EE 10 #411

@roeltje25

Description

@roeltje25

I refer to issue #303 where I addressed that @RouteScoped and @UIScoped annotations were properly taken into account when using bean-discovery-mode="annotated". The decision was taken to require a @CDIComponent annotation for any bean with @RouteScoped annotation when using bean-discovery-mode="annotated". Those that use this discovery mode will then have to use double annotations for all instances where @RouteScoped is used.

Now with that context in mind I notice that in Jakarte EE 10 the default bean-discovery-mode is changed to "annotated". Which will mean that the impact of the requirement of needing an @CDIComponent annotation is enlarged to any and all that do not explicitly have set their bean-discovery-mode to "all".

I do dare to stubbornly but confidently suggest to mark the @RouteScoped and @UIScoped annotations @stereotype after all to prevent users to code tautologies ( extends Component and also mark CDIComponent, and also say @RouteScoped) and prevent any future problems when people migrate to Jakarta EE 10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🔖 Normal Priority (P2)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions