O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required