9.3.2 Injective relationship of the CDI-target J2EE modules

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]

The relationships that can be injected and cannot be injected as CDI targets are as follows:

Relationships that can be injected as CDI targets
  1. Injection from WEB-INF/classes in a WAR to WEB-INF/classes in the same WAR
  2. Injection from the classes included in a library JAR to the classes included in another library JAR
  3. Injection from the classes included in a library JAR to the classes included in the same library JAR
  4. Injection from the classes included in an EJB-JAR to the classes included in another EJB-JAR (however, an EJB cannot be injected)
  5. Injection from the classes included in an EJB-JAR to the classes included in the same EJB-JAR (however, an EJB cannot be injected)
  6. Injection from the classes included in a library JAR to the classes included in an EJB-JAR
  7. 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)
  8. 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
  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. Injection from the classes included in an EJB-JAR to the classes included in a library JAR