Using JNDI Functionality

You have already seen the most common use of JNDI within the J2EE environment and that is the lookup of objects, usually J2EE components. JNDI can also be used to:

  • Bind objects to the name service

  • List objects in a context

  • Create and delete contexts

These features are briefly discussed in the following sections.

CAUTION

One word of warning about the security features discussed: Some Name Services (such as LDAP) may use security features to ensure that only authorized programs can change the object bindings or contexts. On a live system, the program must supply valid user credentials when obtaining the initial context (see the “Security” section later in this lesson). If you attempt to modify an existing name or bind a new ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.