docs: public BeanManager getBeanManager()
      {
          BeanManagerInfo bmi = getBeanManagerInfo(getClassLoader(null));
  
          // warn the user if he tries to use the BeanManager before container startup
          if (!bmi.booted)
          {
              LOG.warning("When using the BeanManager to retrieve Beans before the Container is started," +
                      " non-portable behaviour results!");
          }
  
          BeanManager result = bmi.finalBm;
  
          if (result == null)
          {
              synchronized (this)
              {
                  result = bmi.finalBm;
                  if (result == null)
                  {
                      // first we look for a BeanManager from JNDI
                      result = resolveBeanManagerViaJndi();
  
                      if (result == null)
                      {
                          // if none found, we take the one we got from the Extension loading
                          result = bmi.loadTimeBm;
                      }
  
                      if (result == null)
                      {
                          throw new IllegalStateException("Unable to find BeanManager. " +
                                  "Please ensure that you configured the CDI implementation of your choice properly.");
                      }
  
                      // store the resolved BeanManager in the result cache until #cleanupFinalBeanManagers gets called
                      // -> afterwards the next call of #getBeanManager will trigger the final lookup
                      bmi.finalBm = result;
                  }
              }
          }
  
          return result;
      }