docs: public static String getApplicationName(BundleContext bundleContext) {
          String applicationName = null;
          if (FrameworkState.isValid()) {
              ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
  
              if (cmd == null) {
                  //if the component metadata is null then we're probably running in the CDI startup sequence so try asking CDI for the application
                  applicationName = getCDIAppName(bundleContext);
              } else {
                  applicationName = cmd.getJ2EEName().getApplication();
              }
  
              if (applicationName == null) {
                  if (cmd == null) {
                      throw new ConfigStartException(Tr.formatMessage(tc, "no.application.name.CWMCG0201E"));
                  } else {
                      throw new ConfigException(Tr.formatMessage(tc, "no.application.name.CWMCG0201E"));
                  }
              }
          }
          return applicationName;
  
      }