Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cu-dev] Classes on which the XYZDefinition is valid in case of CDI

Hi,

The XYZDefinition classes in Concurrency are currently legal to be placed on any class, as the JNDI scanning code seemingly always scans every class in the application.

In CDI however there are limitations on which classes are scanned, and depending on several settings not all classes are scanned. 

So a problem occurs when an XYZDefinition appears on a class that is not scanned by CDI, but does use qualifiers. In that case, CDI will not directly get to see the class and the JNDI scanning code must somehow put it somewhere where CDI can find it. This is however not trivial, as we don't even know whether JNDI or CDI is initialized first (we never specified anything about ordering in Jakarta EE, which is its own problem, but for now we need to deal with that).

I wonder if we should update the specification to say that whenever qualifiers are used with an XYZDefinition annotation, they are only legal to be placed on any type of class that CDI can scan.

Thoughts?

Kind regards,
Arjan Tijms

Back to the top