code: public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
        throws Exception
     {
        Reference ref = (Reference)obj;
        String className = (String)ref.get("class").getContent();
        String cfname = (String)ref.get("name").getContent();
  
        return objs.get(qualifiedName(cfname, className));
     }
docs: Obtain the connection factory
  {@inheritDoc}