Name n = new Name(nc[0]);
if (nc.length > 1) {
org.omg.CORBA.Object next_context = (org.omg.CORBA.Object) this.contexts.get(n);
if ((next_context == null) || (isDead(next_context)))
throw new NotFound(NotFoundReason.missing_node, nc);
NameComponent[] nc_prime = new NameComponent[nc.length - 1];
System.arraycopy(nc, 1, nc_prime, 0, nc_prime.length);
// try first to call the context implementation object directly.
String contextOID = this.getObjectOID(next_context);
JBossNamingContext jbossContext = (contextOID == null ? null : contextImpls.get(contextOID));
if (jbossContext != null)
return jbossContext.resolve(nc_prime);
else
return NamingContextExtHelper.narrow(next_context).resolve(nc_prime);
} else {
org.omg.CORBA.Object result = (org.omg.CORBA.Object) this.contexts.get(n);
if (result == null)
result = (org.omg.CORBA.Object) this.names.get(n);
if (result == null)
throw new NotFound(NotFoundReason.missing_node, n.components());
if (!noPing && isDead(result))
throw new NotFound(NotFoundReason.missing_node, n.components());
return result;
}
}