iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/CNCtx.java
public java.lang.Object lookup(Name name)
            throws NamingException {
        if (_nc == null)
            throw IIOPLogger.ROOT_LOGGER.notANamingContext(name.toString());
        if (name.size() == 0)
            return this; // %%% should clone() so that env can be changed
        NameComponent[] path = org.wildfly.iiop.openjdk.naming.jndi.CNNameParser.nameToCosName(name);

        try {
            java.lang.Object answer = callResolve(path);

            try {
                return NamingManager.getObjectInstance(answer, name, this, _env);
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = IIOPLogger.ROOT_LOGGER.errorGeneratingObjectViaFactory();
                ne.setRootCause(e);
                throw ne;
            }
        } catch (CannotProceedException cpe) {
            javax.naming.Context cctx = getContinuationContext(cpe);
            return cctx.lookup(cpe.getRemainingName());
        }
    }
public java.lang.Object lookup(Name name)
            throws NamingException {
        if (_nc == null)
            throw IIOPLogger.ROOT_LOGGER.notANamingContext(name.toString());
        if (name.size() == 0)
            return this; // %%% should clone() so that env can be changed
        NameComponent[] path = org.wildfly.iiop.openjdk.naming.jndi.CNNameParser.nameToCosName(name);

        try {
            java.lang.Object answer = callResolve(path);

            try {
                return NamingManager.getObjectInstance(answer, name, this, _env);
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = IIOPLogger.ROOT_LOGGER.errorGeneratingObjectViaFactory();
                ne.setRootCause(e);
                throw ne;
            }
        } catch (CannotProceedException cpe) {
            javax.naming.Context cctx = getContinuationContext(cpe);
            return cctx.lookup(cpe.getRemainingName());
        }
    }
Converts the "Name" name into a NameComponent[] object and
returns the object resolved by the COS Naming api,
resolve. Returns the current context if the name is empty.
Returns either an org.omg.CORBA.Object or javax.naming.Context object.

@param name JNDI Name used to resolve the object.
@return the resolved object
@throws NamingException See callResolve.