code: @Override
      public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> envmt) throws Exception {
          // by OSGi JNDI spec Name and Context should be null
          // if they are not then this code is being called in
          // the wrong way
          if (n != null || c != null)
              return null;
          // Object is String, String[] or null
          // Hashtable contains any environment properties
          if (o == null) {
              return new JavaURLContext(envmt, helperServices);
          } else if (o instanceof String) {
              return new JavaURLContext(envmt, helperServices).lookup((String) o);
          } else {
              throw new OperationNotSupportedException();
          }
      }
docs: Creates a JavaURLContext for resolving java: urls. It should only be
  called by an OSGi JNDI spec implementation. There is no support for
  non-null Name and Context parameters for this method in accordance with
  the OSGi specification for JNDI.
  
  <UL>
  <LI>If the parameter o is null a new {@link JavaURLContext} is returned.
  <LI>If o is a URL String then the Object returned is the result of
  looking up the String on a {@link JavaURLContext}.
  <LI>If o is an array of URL Strings then an {@link OperationNotSupportedException} is thrown as there is no
  sub-context support in this implementation from which to lookup multiple
  names.
  <LI>If o is any other Object an {@link OperationNotSupportedException} is
  thrown.
  </UL>
  
  @param o
  {@inheritDoc}
  @param n
  must be null (OSGi JNDI spec)
  @param c
  must be null (OSGi JNDI spec)
  @param envmt
  {@inheritDoc}
  @return
  @throws OperationNotSupportedException
  if the Object passed in is not null or a String.