Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JNDI: Naming Service vs Directory Service

As far as Java/JNDI verbiage goes, are "directory services" just more complex versions of "naming services"?

If you read the JNDI glossary, it basically defines these two as follows:

  • naming service - An API that allows you to perform operations on different contexts
  • context - Sounds an awful lot like a HashMap
  • directory service - An API that allows you to perform operations on directory objects
  • directory object - an object that is in a directory....(?!?!)

So, unless I am mistaken, it sounds like both types of services allow CRUD-like operations on different types of objects, either contexts (in the case of a naming service) or directory objects (in the case of directory services).

So my question is: whats the difference?!? Aren't both of these context/directory object types really just hashmaps/hashtables under the hood?

I'm choking on these differences because I'm trying to get an understanding of when something is a naming service, and when it is a directory service, and these definitions are difficult for me to gauge.

like image 693
IAmYourFaja Avatar asked Feb 06 '12 14:02

IAmYourFaja


1 Answers

Aren't both of these context/directory object types really just hashmaps/hashtables under the hood?

No, they are almost certainly database tables under the hood, and they have all kinds of semantics such as attribute lists, the ability to create child contexts, etc, that hashmaps/hashtables don't have.

like image 84
user207421 Avatar answered Oct 13 '22 01:10

user207421