The native naming system is the mechanism that enables JNDI to perform complex naming operations. A naming system is a connected set of contexts of the same type that have the same naming convention, the same set of operations, and identical semantics. A namespace is an instance of a naming system, and as such contains the set of all names in the naming system. A file system, an NDS directory, and even the components of a URL are all naming systems, because they have named objects that can be organized in particular naming conventions.
The only way to determine if two contexts are in the same naming system is to use the equals( ) method on the NameParser instance returned by a given context.
A native naming system can be written in Java for full functionality, or it can be written in C, which requires the use of JNDI. An example of a native naming system is the NetWare file system. It has no Java representation but is implemented in the C language. Without JNDI, you would have to access it through java.io.File, which would prevent you from using advanced file system functionality not present in File. Or you would have to access it through the Java Native Interface (JNI) or from outside of Java.
A naming system can have a Schema (see Section 1.12, Schema Concepts), which is a certain structure within which contexts in a naming system can interact. For example, in the file system, a user can put a file in a directory, a directory in a directory, or a directory or a file on a volume. But the user can’t put a directory into a file or a volume into a directory.
The file system is a well-known naming system that is comprised of particular contexts, so it is a good example of how a naming system works. The file system naming system contains the following contexts:
A volume mounted on a NetWare server containing directories and files directly subordinate to the volume in the file system.
A directory is subordinate to a volume on a file system and contains directories and files.
A file is subordinate to a volume or directory on a file system.