NamingEntry entry = (NamingEntry) iterator.next();
// If the entry is a reference, resolve it
if (entry.type == NamingEntry.REFERENCE
|| entry.type == NamingEntry.LINK_REF) {
try {
// A lookup will resolve the entry
ctx.lookup(new CompositeName(entry.name));
} catch (NamingException e) {
throw e;
} catch (Exception e) {
NamingException ne = new NamingException(e.getMessage());
ne.initCause(e);
throw ne;
}
}
return new Binding(entry.name, entry.value.getClass().getName(),
entry.value, true);