The Environment Class
The Environment class shown below is intended to encapsulate the details of the local environment for the JNDI server. In this particular example, all information is retrieved through the program, but this is information that could just as easily have been retrieved from a properties file, an XML document, or a database. Since we regard the location of the directory server to be relatively static information (moving or renaming the host for a directory server to a new name would have a significant impact on the network), retrieving this information from a localized class should not present a problem.
This class does the majority of its work in the constructor. It creates a Hashtable and loads it with the correct parameters ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access