code: public Object getObjectInstance(Object obj, Name name,
                                      Context nameCtx, Hashtable<?, ?> environment)
          throws Exception
      {
          Reference ref = (Reference) obj;
  
          String api = null;
          String url = null;
  
          for (int i = 0; i < ref.size(); i++) {
              RefAddr addr = ref.get(i);
  
              String type = addr.getType();
              String value = (String) addr.getContent();
  
              if (type.equals("type"))
                  api = value;
              else if (type.equals("url"))
                  url = value;
              else if (type.equals("user"))
                  setUser(value);
              else if (type.equals("password"))
                  setPassword(value);
          }
  
          if (url == null)
              throw new NamingException("`url' must be configured for HessianProxyFactory.");
          // XXX: could use meta protocol to grab this
          if (api == null)
              throw new NamingException("`type' must be configured for HessianProxyFactory.");
  
          Class apiClass = Class.forName(api, false, _loader);
  
          return create(apiClass, url);
      }
docs: JNDI object factory so the proxy can be used as a resource.