| Start |
|---|
| RMI through JNDI This example shows how JNDI works in RMI. It has two roles:
The RMI Registry is part of RMI, not JNDI. To make this simple, we will use How to run the eaxmple:
Introduce The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name. It is designed to be independent of any specific naming or directory service implementation. The JNDI architecture consists of an API (Application Programming Interface) and an SPI (Service Provider Interface). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the API of the JNDI technology to access their services. As you can see form the picture above, JNDI supports LDAP, DNS, NIS, NDS, RMI and CORBA. Of course, you can extend it. How it works In this example, the Java RMI use the JNDI API to look up objects in a network. If you want to look up a object, you need at least two pieces of information:
The RMI Registry manages the name bindings, it tells you where to find the object.
What is a object's name? It is usually a string, it can also be a object that implements the Name interface. Step by step |
Read Article
https://develop.horje.com/learn/1434/reference