BEA Logo BEA WebLogic Server Release 6.1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

  |  

  WebLogic Server Doc Home   |     Programming WebLogic JNDI   |   Previous Topic   |   Next Topic   |   Contents   |   View as PDF

Introduction to WebLogic JNDI

 

This section presents an overview of the JNDI implementation in WebLogic Server.

 


Overview of JNDI in WebLogic Server

In an enterprise, naming services provide a means for your application to locate objects on the network. A naming service associates names with objects and finds objects based on their given names. (The RMI registry is a good example of a naming service.)

The Java Naming and Directory Interface (JNDI) is an application programming interface (API) that provides naming services to Java applications. JNDI is an integral component of Sun Microsystems Inc.'s Java 2 Enterprise Edition (J2EE) technology.

JNDI is defined to be independent of any specific naming or directory service implementation. It supports the use of a single method for accessing various new and existing services.

The JNDI support provided by WebLogic Server is based on the standard JNDI API classes defined by Sun Microsystems, Inc. This support allows any service-provider implementation to be plugged into the JNDI framework using the standard service provider interface (SPI) conventions. In addition, JNDI allows Java applications in WebLogic Server to access external directory services such as LDAP in a standardized fashion, by plugging in the appropriate service provider. WebLogic Server supports version 1.2.1 of the JNDI API.

The WebLogic Server implementation of JNDI supplies methods that:

Each WebLogic Server cluster is supported by a replicated cluster-wide JNDI tree that provides access to both replicated and pinned RMI and EJB objects. While the JNDI tree representing the cluster appears to the client as a single global tree, the tree containing the cluster-wide services is actually replicated across each WebLogic Server in the cluster. For more information, see Using WebLogic JNDI in a Clustered Environment.

The integrated naming service provided by WebLogic Server JNDI may be used by many other WebLogic services. For example, WebLogic RMI can bind and access remote objects by both standard RMI methods and JNDI methods.

In addition to the standard Sun Microsystems Inc. interfaces for JNDI, WebLogic Server provides its own implementation, weblogic.jndi.WLInitialContextFactory, that uses the standard JNDI interfaces.

In your application code, you need not instantiate this class directly. Instead, you can use the standard javax.naming.InitialContext class and set the appropriate hash table properties, as documented in the section Setting Up JNDI Environment Properties for the InitialContext. All interaction is done through the javax.naming.Context interface, as described in the JNDI Javadoc.

For instructions on using the WebLogic JNDI API for client connections, see Programming with WebLogic JNDI.

 

back to top previous page next page