This chapter explored how dependency injection works with CDI containers through typesafe resolution, to help us understand bean types and qualifiers in determining which bean instance will be injected into an injection point. We covered some built-in qualifiers from the container before we created some of our own qualifiers, with and without members.
Injection points were explained with respect to typesafe resolution, before we looked at the metadata associated with an injection point and how that can be used when creating a bean instance.
We also covered creating alternatives and how they are activated within beans.xml
, programmatically retrieving a bean instance at runtime for greater control, how Weld uses a proxy for injecting the non @Dependent
beans, and how to resolve types that cannot be proxied.