Dependency Injection (DI) is a functionality with which the EJB container automatically sets the references to the Enterprise Beans and resources, by specifying the @EJB and @Resource annotations in the fields and the setter method of the EJBs and interceptor classes. If you use the DI, the references to the Enterprise Beans and resources need not be looked up by using the JNDI. This section describes the types of resources that can be specified in the @Resource annotation, the resolution of the resource references using the @Resource annotation, and the notes on the DI.
The following table describes the organization of this section.
Table 12-5 Organization of this section (Using the DI)
Category | Title | Reference location |
---|---|---|
Explanation | Types of resources that can be specified in the @Resource annotation | 12.4.1 |
Resolving the resource references using the @Resource annotation | 12.4.2 | |
Operations during DI failure | 12.4.3 | |
Notes | Notes | 12.4.4 |
Note: The functionality-specific explanation is not available for "Implementation", "Settings", and "Operations".