官术网_书友最值得收藏!

Contexts and dependency injection

When designing an enterprise solution, one of the primary tasks is to divide your application into separate components that interact with each other. To avoid all the hassle of managing our components, their dependencies, and their life cycles, the contexts and dependency API (CDI) has been developed to be the backbone of component and dependency management. By components, we mean objects that encapsulate your application's business logic. By dependencies, we mean commonly used application-shared resources such as a database connection, user sessions, web service endpoints, and such.

In Chapter 2, Dependency Injection Using CDI 2.0, we'll learn how to create and use CDI beans, how to use bean scopes, how to provide different implementations of the same bean, and how to inject beans into other beans. Moreover, we'll learn about some more advanced topics, such as producers, interceptors, and events.

主站蜘蛛池模板: 铜山县| 中江县| 衡阳市| 张家界市| 北碚区| 桓台县| 藁城市| 久治县| 景宁| 灵武市| 沾化县| 望奎县| 阿拉尔市| 佛冈县| 南京市| 武功县| 新干县| 理塘县| 彩票| 仪陇县| 浙江省| 孝昌县| 合水县| 祁门县| 雷山县| 江山市| 临沭县| 肥东县| 庆云县| 余姚市| 昭觉县| 南澳县| 溧阳市| 花莲市| 顺义区| 道孚县| 增城市| 宣化县| 宜兴市| 华宁县| 孙吴县|