naming/src/main/java/org/jboss/as/naming/NamingContext.java
public Object lookupLink(Name name) throws NamingException {
        check(name, JndiPermission.ACTION_LOOKUP);

        if (name.isEmpty()) {
            return lookup(name);
        }
        try {
            final Name absoluteName = getAbsoluteName(name);
            Object link = namingStore.lookup(absoluteName);
            if (!(link instanceof LinkRef) && link instanceof Reference) {
                link = getObjectInstance(link, name, null);
            }
            return link;
        } catch (Exception e) {
            throw namingException(NamingLogger.ROOT_LOGGER.cannotLookupLink(), e, name);
        }
    }
public Object lookupLink(Name name) throws NamingException {
        check(name, JndiPermission.ACTION_LOOKUP);

        if (name.isEmpty()) {
            return lookup(name);
        }
        try {
            final Name absoluteName = getAbsoluteName(name);
            Object link = namingStore.lookup(absoluteName);
            if (!(link instanceof LinkRef) && link instanceof Reference) {
                link = getObjectInstance(link, name, null);
            }
            return link;
        } catch (Exception e) {
            throw namingException(NamingLogger.ROOT_LOGGER.cannotLookupLink(), e, name);
        }
    }
{@inheritDoc}