// List the root of the nns.
// Note the use of a trailing slash to indicate traversal into the nns.
NamingEnumeration enum = ctx.list("java.sun.com/");
// A composite name lookup.
Object obj = ctx.lookup("sun.com/some/x/y/z");