code: private Object createResource(String refName, String className, String bindingName, ResourceInfo resourceRefInfo) throws Exception {
          String nameFilter = FilterUtils.createPropertyFilter(ResourceFactory.JNDI_NAME, bindingName);
          String createsFilter = className == null ? null : FilterUtils.createPropertyFilter(ResourceFactory.CREATES_OBJECT_CLASS, className);
          String filter = createsFilter == null ? nameFilter : "(&" + nameFilter + createsFilter + ")";
          ResourceInfo resInfo = resourceRefInfo != null ? resourceRefInfo : className != null ? new ResourceEnvRefInfo(refName, className) : null;
          return createResourceWithFilter(filter, resInfo);
      }
docs: Try to obtain an object instance by creating a resource using a
  ResourceFactory.
  
  @return the object instance, or null if an object could not be found