being new to CDI, i want to know the practical difference between an alternative and a Qualifier.

in Weld reference, it's stated that:

4.3. Qualifier annotations

If we have more than one bean that implements a particular bean type, the injection point can specify exactly which bean should be injected using a qualifier annotation.

but while explaining the Alternatives, it is said:

4.7. Alternatives

Alternatives are beans whose implementation is specific to a particular client module or deployment scenario.

If I understood right, @Qualifier defines which implementations of the target bean get injected to the Injection Points.

on the other hand @Alternative describes a wish during deployment dependending on the client about whether or not an Alternatice to the standard (the "@default" I mean ) bean get Injected to the injection's point.

It is right ?

Edit
Report