docs: public BeanDiscoveryMode getBeanDiscoveryMode(CDIRuntime cdiRuntime, BeansXml beansXml) {
          BeanDiscoveryMode mode = BeanDiscoveryMode.ANNOTATED;
          if (beansXml != null) {
              mode = beansXml.getBeanDiscoveryMode();
          } else if (cdiRuntime.isImplicitBeanArchivesScanningDisabled(this)) {
              // If the server.xml has the configuration of enableImplicitBeanArchives sets to false, we will not scan the implicit bean archives
              mode = BeanDiscoveryMode.NONE;
          }
          return mode;
      }