docs: @Override
      protected T createInstance() throws Exception {
          for (final String beanName : this.delegateBeanNames) {
              try {
                  final T bean;
                  if (this.type == null) {
                      bean = (T) this.getBeanFactory().getBean(beanName);
                  } else {
                      bean = this.getBeanFactory().getBean(beanName, this.type);
                  }
  
                  if (this.logger.isInfoEnabled()) {
                      this.logger.info("Loaded bean for name " + beanName);
                  }
  
                  return bean;
              } catch (final Exception e) {
                  final String msg =
                          "Failed to load bean '"
                                  + beanName
                                  + "' from ApplicationContext"
                                  + (this.type != null ? " expecting type: " + this.type : "")
                                  + ". Will try to load the next bean in the list instead. Error message from the attempt to load this bean ('"
                                  + beanName
                                  + "'): ";
  
                  if (this.logger.isDebugEnabled()) {
                      this.logger.debug(msg, e);
                  } else if (this.logger.isInfoEnabled()) {
                      this.logger.info(
                              msg + " " + e.getMessage() + " (enable debug for stack trace)");
                  }
              }
          }
  
          throw new BeanCreationException(
                  "None of the configured bean names could be loaded. BeanNames: "
                          + this.delegateBeanNames);
      }