Gunnar Morling commented on Task BVAL-307

I don't want to see applications failing all of the sudden because a new version of library x adds a dependency to a BV implementation.

I think CDI raises an error upon container start-up in case of ambiguous injections, specifying the involved beans. So it should be easy for a user to detect and fix such a situation by removing superfluous providers or explicitly enforcing one provider via a qualifier.

Maybe one could also declare one of the providers as the default one (meaning injectable without qualifier) based on what's configured in validation.xml.

All in all I find having to explictely resolve any ambiguity better than unintentionally switching to another provider. This might cause runtime errors when relying on provider-specific features such as HV's boolean constraint composition feature (one should have specified the provider explicitly in such cases in the first place, but I guess it's easy to forget as long as there is only one provider).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira