Understanding the necessity of type Safety in CDI
问题 First I should clarify that this post is not intended to criticize CDI, but to discover the thinking and assumptions behind the design of CDI and that will have obvious influence on designing any web app, which uses CDI. One of the most distinguished feature of CDI (of Java EE 6) is type safety . Jboss Seam was not safe in type. It uses name to qualify any instance to inject. Like bellow: @Name("myBean") public class MyBean implements Bean { ... } @Name("yourBean") public class YourBean