This subsection describes the injective relationship of the CDI-target J2EE modules.
The following figure shows the injective relationship of the CDI-target J2EE modules.
Figure 9-1 Injective relationship of the CDI-target J2EE modules
![[Figure]](figure/zu099000.gif)
The relationships that can be injected and cannot be injected as CDI targets are as follows:
- Relationships that can be injected as CDI targets
- Injection from WEB-INF/classes in a WAR to WEB-INF/classes in the same WAR
- Injection from the classes included in a library JAR to the classes included in another library JAR
- Injection from the classes included in a library JAR to the classes included in the same library JAR
- Injection from the classes included in an EJB-JAR to the classes included in another EJB-JAR (however, an EJB cannot be injected)
- Injection from the classes included in an EJB-JAR to the classes included in the same EJB-JAR (however, an EJB cannot be injected)
- Injection from the classes included in a library JAR to the classes included in an EJB-JAR
- Injection from the classes included in a library JAR to the classes included in a WAR (JAR beneath WEB-INF/classes and WEB-INF/lib)
- Injection from the classes included in an EJB-JAR to the classes included in a WAR (JAR beneath WEB-INF/classes and WEB-INF/lib)
- Relationships that cannot be injected as CDI targets
- Injection from the classes included in WEB-INF/classes in a WAR to the classes included in a JAR beneath WEB-INF/lib in the same WAR
- Injection from the classes included in a JAR beneath WEB-INF/lib in a WAR to the classes included in WEB-INF/classes in the same WAR
- Injection from the classes included in a JAR beneath WEB-INF/lib in a WAR to the classes included in a JAR beneath WEB-INF/lib in the same WAR
- Injection from the classes included in a WAR (JAR beneath WEB-INF/classes and WEB-INF/lib) to the classes included in an EJB-JAR
- Injection from the classes included in a WAR (JAR beneath WEB-INF/classes and WEB-INF/lib) to the classes included in a library JAR
- Injection from the classes included in an EJB-JAR to the classes included in a library JAR