Contexts and Dependency Injection
暂无分享,去创建一个
In this chapter, we will discuss Contexts and Dependency Injection (CDI). CDI provides powerful services to glue the various tiers of the Java EE framework together. The first public draft of Java Contexts and Dependency Injection for the Java EE Platform, as defined in JSR 299, was made public in 2008. During the initial development phase, the JSR 299 specification was called Web Beans. After the specification was renamed to Contexts and Dependency Injection, the initial reference implementation was given the name Web Beans. The use of the same name, Web Beans, in two different contexts created some confusion among the community members, and this led to the renaming of the reference implementation from Web Beans to Weld. CDI builds upon the Interceptor Specification (JSR 318), the Managed Bean Specification (JSR 316), and the Dependency Injection for Java Specification (JSR 330).