BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   Programming WebLogic JNDI:   Previous topic   |   Next topic   |   Contents   

 

Introduction to WebLogic JNDI

 

This sections 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 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 the Sun Microsystems Java 2 Platform 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 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 clusters 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 for using the WebLogic JNDI API for client connections, see Programming with WebLogic JNDI.

 

Back to Top