Given that it is legal to have multiple BV providers in the classpath at the same time (and the BV bootstrap API allows to choose an implementation in that case), I'd say regarding (1), each Validator(Factory) should be registered with a qualifier. If only one BV provider is present, IMO users should be able to obtain validators/factories without specifying the qualifier, otherwise they should be required to qualify the injection point with the intended provider.
If there are ambiguous injections the container throws an exception. Also afaiu it is one of the core ideas of CDI that I can have multiple implementations of a bean. I just have to tell CDI which one to choose. That's the reason why I went for the qualifier approach. In most situations there will only be one provider anyways so the default injection will just work. To me this solution is the closest in the CDI spirit. As a second choice I would go for the fail the startup approach.
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
If there are ambiguous injections the container throws an exception. Also afaiu it is one of the core ideas of CDI that I can have multiple implementations of a bean. I just have to tell CDI which one to choose. That's the reason why I went for the qualifier approach. In most situations there will only be one provider anyways so the default injection will just work. To me this solution is the closest in the CDI spirit. As a second choice I would go for the fail the startup approach.