Can anyone tell me what is the purpose of JNDI.I went through many articles.But iam not getting the purpose of JNDI.
Please correct me if iam wrong anywhere.
Below is my understanding and Questions about JNDI API
It has two services - Naming and Directory Services.
1) Naming Services are used to locate an object which is mapped with a name.So, its a named object.
Eg: A File say temp.txt will be mapped to an object and whenever an application needs the file to be read/manipulated,we look up with the name associated and do the needful.
Question - I can also do the same thing by opening the file provided it should be any place in the SERVER and the code should locate it.Correct?In JNDI, we are mapping the file (that is again available in the SERVER) and retreive it.What is the difference here?
2) Directory Services - Using this service, we can have additional attributes.Can't we achieve the same by defining below in a property file and accessing it.What is the purpose of Directory services.
The Java Naming and Directory Interface API is an advanced API typically used in building complex applications such as an application server or a web server, e.g. WebSphere. Developers that create applications which are "hosted" on these applications rarely write code using JNDI API.