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

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.

主站蜘蛛池模板: 承德市| 景谷| 玉田县| 泰宁县| 泾阳县| 科技| 汤阴县| 平和县| 巨鹿县| 梁山县| 景谷| 佛教| 康平县| 合川市| 浑源县| 阳原县| 保康县| 毕节市| 沐川县| 诸城市| 耒阳市| 青海省| 出国| 吴江市| 正安县| 龙川县| 永德县| 宝应县| 陇南市| 平邑县| 东乌| 永福县| 达尔| 二连浩特市| 嘉峪关市| 扬州市| 泰来县| 浏阳市| 顺平县| 弋阳县| 郧西县|