13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

484Chapter 21Introducti<strong>on</strong> to Enterprise JavaBeansKey to directory services is the c<strong>on</strong>cept of a c<strong>on</strong>text. A c<strong>on</strong>text is a set ofbindings with a comm<strong>on</strong> name, expressed in a comm<strong>on</strong> way. In our filesystemexample, /etc is a c<strong>on</strong>text. A c<strong>on</strong>text may c<strong>on</strong>tain other c<strong>on</strong>texts that followthe same naming c<strong>on</strong>venti<strong>on</strong>. For example, /etc/sysc<strong>on</strong>fig is a c<strong>on</strong>text thatis a subc<strong>on</strong>text of /etc. Likewise, multitool.net is a subc<strong>on</strong>text of thenet c<strong>on</strong>text.A c<strong>on</strong>text is distinguished by having a naming c<strong>on</strong>venti<strong>on</strong> for itself andits subc<strong>on</strong>texts, and it must have means of creating bindings, removingbindings, and querying or listing bindings.Since JNDI is designed to operate across multiple naming and directorysystems, it is necessary to talk about naming systems and namespaces. A namingsystem is a c<strong>on</strong>nected set of c<strong>on</strong>texts that use the same naming c<strong>on</strong>venti<strong>on</strong>.Thus, Internet domain names are a naming system, UNIX filenames are anaming system, and so <strong>on</strong>. A namespace is a set of names in a naming system.These terms will have significance later when we’ll talk about JNDI.A naming system binds a name to a value. Directory services bind a directoryobject to <strong>on</strong>e or more attributes. A naming service could be thought of asa simple case of a directory where “name” and “value” are the attributes of thedirectory object. A directory can store many more attributes (bindings) for agiven name than can a naming service. Directory services also (in general)support the noti<strong>on</strong> of searches and queries.A directory object represents an object in the computing envir<strong>on</strong>ment. Thismight be a server, a printer, a user, a router, whatever. Each object would havea set of attributes that describe the object. A directory is a c<strong>on</strong>nected set ofdirectory objects.In the directories we know about (see Secti<strong>on</strong>s 21.3.2.4 and 21.3.2.5 forthe limits of our knowledge), directory objects are arranged in a hierarchy, sothat they serve as naming c<strong>on</strong>texts as well as directory objects.21.3.2 Comm<strong>on</strong> Directory ServicesNow that you have seen the c<strong>on</strong>cepts, we can cover a few comm<strong>on</strong> implementati<strong>on</strong>sof naming and directory services.21.3.2.1 Domain Name Service (DNS)This is probably the most familiar naming and directory system. It is used allthe time to resolve Internet host names to IP addresses, and it is comm<strong>on</strong>lyused to obtain the names of mail servers for domains. It also has less often used

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!