Hi,
That's interesting too. I indeed remember something among that lines, and we should add something about it regardless. DataSourceDefinition is strictly speaking not part of any "concrete" spec, as it's in common annotations, and therefor theoretically targeted at many different specifications to apply their own more specific behaviour and rules (of course for DataSourceDefinition that's not what we do at all, so therefor I think it is not really a "common" annotation, but that aside).
The main point still holds though. For qualifiers to really work reliably in CDI, the definition annotation should be aligned with whatever CDI scans. So even though it officially becomes "any container managed" class, then it would still not help CDI much. For CDI to be able to pick it up, it should be *exactly* what CDI gets to see.
So I would love to see spec text saying "on a container-managed class, such as a servlet or enterprise bean class" when no qualifier is used, and on a "CDI managed bean" when one or more qualifiers are used and/or when it's intended to be injectable by CDI (for the default case?).
Kind regards,
Arjan Tijms