Tuesday, April 10, 2012

JNDI

http://docs.oracle.com/javase/jndi/tutorial/

JNDI
Java Naming and Directory Interface

Naming service It is a mean by which names are associated with objects and objects are found based on their names.The naming system determines the syntax that the name must follow. This syntax is sometimes called the naming system's naming convention.

Bindings
The association of a name with an object is called a binding.

Context
A context is a set of name-to-object bindings. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns the object and may provide operations such as those for binding names, unbinding names, and listing bound names. A name in one context object can be bound to another context object (called a subcontext) that has the same naming convention.
    For example, a file directory, such as /usr, in the UNIX file system is a context. A file directory named relative to another file directory is a subcontext (some UNIX users refer to this as a subdirectory). That is, in a file directory /usr/bin, the directory bin is a subcontext of usr. In another example, a DNS domain, such as COM, is a context. A DNS domain named relative to another DNS domain is a subcontext. For example, in the DNS domain Sun.COM, the DNS domain Sun is a subcontext of COM.

Naming system
A naming system is a connected set of contexts of the same type (they have the same naming convention) and provides a common set of operations.
For example, a system that implements the DNS is a naming system. A system that communicates using the LDAP is a naming system.

Namespace
A namespace is the set of names in a naming system.

How to use JNDI
To use the JNDI, you must have the JNDI classes and one or more service providers. The Java 2 SDK, v1.3 includes three service providers for the following naming/directory services:
Lightweight Directory Access Protocol (LDAP)
Common Object Request Broker Architecture (CORBA) Common Object Services (COS) name service
Java Remote Method Invocation (RMI) Registry



No comments:

Post a Comment

SpringBoot Application Event Listeners

When a spring boot application starts few events occurs in below order ApplicationStartingEvent ApplicationEnvironmentPreparedEvent Applicat...