code: @Override
      public Object lookup(Name inName) throws NamingException {
          NameUtil nameUtil = new NameUtil(inName);
  
          Object toReturn = null;
  
          //if there wasn't a name to lookup return a Context
          if (nameUtil.getStringNameWithoutPrefix().equals(""))
              return new JavaURLContext(nameUtil.getName(), this);
  
          // loop through the helper services looking for a non-null result
          for (Iterator<JavaColonNamingHelper> it = helperServices.getServices(); it.hasNext();) {
              JavaColonNamingHelper helperService = it.next();
              toReturn = helperService.getObjectInstance(nameUtil.getNamespace(), nameUtil.getNameInContext());
              if (toReturn != null) {
                  break;
              }
          }
  
          if (toReturn != null) {
              // return the resource asked for
              return toReturn;
          }
  
          boolean hasPrefix = false;
          // loop through the helper services to know whether any object instance's name
          // is prefixed with the name specified
          for (Iterator<JavaColonNamingHelper> it = helperServices.getServices(); it.hasNext();) {
              JavaColonNamingHelper helperService = it.next();
              hasPrefix = helperService.hasObjectWithPrefix(nameUtil.getNamespace(), nameUtil.getNameInContext());
              if (hasPrefix) {
                  break;
              }
          }
  
          if (!hasPrefix) {
              throw new NameNotFoundException(NameNotFoundException.class.getName() + ": " + nameUtil.getName().toString());
          }
  
          return new JavaURLContext(nameUtil.getName(), this);
      }
docs: Since the java: URL {@link Context} in this implementation does not
  support binding, the lookup is lazy and performs as follows.
  <OL>
  <LI>Call all the helper services which have registered under the {@link JavaColonNamingHelper} interface in the SR.
  <LI>If a non-null object is returned from a helper then return
  that object, as it is the resource being looked up.
  </OL>
  
  Throws NameNotFoundException if no matching Object is found.
  
  @param n
  {@inheritDoc}
  @return {@inheritDoc}
  @throws NamingException {@inheritDoc}