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