JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Application Development Guide
search filter icon
search icon

Document Information


Part I Development Tasks and Tools

1.  Setting Up a Development Environment

2.  Class Loaders

3.  Debugging Applications

Part II Developing Applications and Application Components

4.  Securing Applications

5.  Developing Web Services

6.  Using the Java Persistence API

7.  Developing Web Applications

8.  Using Enterprise JavaBeans Technology

9.  Using Container-Managed Persistence

10.  Developing Java Clients

11.  Developing Connectors

12.  Developing Lifecycle Listeners

13.  Developing OSGi-enabled Java EE Applications

Part III Using Services and APIs

14.  Using the JDBC API for Database Access

15.  Using the Transaction Service

16.  Using the Java Naming and Directory Interface

Accessing the Naming Context

Global JNDI Names

Accessing EJB Components Using the CosNaming Naming Context

Accessing EJB Components in a Remote GlassFish Server

Naming Environment for Lifecycle Modules

Configuring Resources

External JNDI Resources

Custom Resources

Built-in Factories for Custom Resources





Disabling GlassFish Server V2 Vendor-Specific JNDI Names

Using Application-Scoped Resources

Using a Custom File

Mapping References

17.  Using the Java Message Service

18.  Using the JavaMail API


Chapter 16

Using the Java Naming and Directory Interface

A naming service maintains a set of bindings, which relate names to objects. The Java EE naming service is based on the Java Naming and Directory Interface (JNDI) API. The JNDI API allows application components and clients to look up distributed resources, services, and EJB components. For general information about the JNDI API, see You can also see the JNDI tutorial at

The following topics are addressed here:

Note - The Web Profile of the GlassFish Server supports the EJB 3.1 Lite specification, which allows enterprise beans within web applications, among other features. The full GlassFish Server supports the entire EJB 3.1 specification. For details, see JSR 318.