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

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.

主站蜘蛛池模板: 保德县| 明水县| 双柏县| 岢岚县| 崇仁县| 财经| 黄大仙区| 延川县| 辽中县| 钟山县| 牡丹江市| 丽江市| 泽库县| 马尔康县| 东宁县| 德江县| 永新县| 通州市| 靖安县| 荣昌县| 高邮市| 奈曼旗| 敖汉旗| 获嘉县| 紫阳县| 白朗县| 宁远县| 南平市| 凤庆县| 福清市| 泗水县| 高雄市| 河东区| 灵台县| 沂水县| 新巴尔虎左旗| 华池县| 东丰县| 遵义县| 宽甸| 南漳县|