2.4.1 Types of JNDI name spaces

This subsection describes the types of JNDI name spaces defined in Java EE and the range that can be looked up.

The following figure shows the range of the JNDI name space.

Figure 2-4 Range of the JNDI name space

[Figure]

The name space that can be used depends on whether the component to be looked up is included in the same process, application, module, or component as the lookup source. The following table describes the relationship with the components to be looked up, and the possibility of lookup in each name space.

Table 2-9 Possibility of lookup in each name space

No.Relationship with the component to be looked upName space to be looked up
Server (Process)ApplicationModuleComponentjava:globaljava:appjava:modulejava:comp
1SameSameSameSameYYYY
2SameSameSameDifferentYYYC #1
3SameSameDifferentDifferentYYNN
4SameDifferentDifferentDifferentYNNN
5Different#2DifferentDifferentDifferentY#3NNN
Legend:
Y: Can be looked up.
C: Can be looked up depending on the component type.
N: Cannot be looked up.
#1
Can be looked up in the case of components in the Web application (servlets, JSPs, or filters).
#2
Indicates that the server (process) is different, but the same CORBA Naming Service is used. Includes the lookup of J2EE applications in a J2EE server from the EJB client application.
#3
Only the automatically bound EJB references can be looked up (Application Server-specific specifications).