7.5. Examining a typical EJB server namespace
To examine a JNDI namespace, we need a piece of software that can act as a general-purpose JNDI client, displaying all the information in the namespace. A simple utility class for recursively enumerating a JNDI namespace is shown in Listing 7.1. A command-line interface for this class is shown in Listing 7.2.
The full source code for this example is in the source code package, in directory jndidump.
If you run this code against the J2EE Reference Implementation, and you have registered JNDI names for the XA-compliant cloudscape database driver, you will get a ClassNotFoundException unless you ensure that cloudscape.jar is on the class search path.
This class uses the listBindings()