private static void dumpTreeEntry(NamingEnumeration<NameClassPair> list, String s)
     throws NamingException {
   System.out.println("\ndump " + s);
   while (list.hasMore()) {
     NameClassPair ncp = list.next();
     System.out.println(ncp.toString());
     if (s.length() == 0) {
       dumpJndi(ncp.getName());
     } else {
       dumpJndi(s + "/" + ncp.getName());
     }
   }
 }