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

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.

主站蜘蛛池模板: 新郑市| 三都| 安仁县| 陈巴尔虎旗| 平武县| 石景山区| 奉贤区| 东乡| 博罗县| 高要市| 任丘市| 鄂尔多斯市| 苏尼特左旗| 富裕县| 南丹县| 独山县| 永定县| 天水市| 大荔县| 石渠县| 德钦县| 灵丘县| 台湾省| 阿鲁科尔沁旗| 澄江县| 淮南市| 平潭县| 辉南县| 萨嘎县| 怀集县| 三河市| 色达县| 彰武县| 德庆县| 黑水县| 松溪县| 温泉县| 普陀区| 肃宁县| 龙门县| 黄冈市|