code: protected void preloadModules() {
  
          // Add default ModuleModel component interface (because it cannot be added by module starter, API is not processed with annotation engine)
          JRebirthThread.getThread().getFacade().componentFactory().define(
                                                                           RegistrationPointItemBase.create()
                                                                                                    .interfaceClass(ModuleModel.class)
                                                                                                    .exclusive(false)
                                                                                                    .reverse(false));
  
          final ServiceLoader<ModuleStarter> loader = ServiceLoader.load(ModuleStarter.class);
  
          final List<ModuleStarter> modules = new ArrayList<>();
          loader.iterator().forEachRemaining(modules::add);
  
          modules.stream()
                 .sorted((m1, m2) -> -1 * Integer.compare(m1.priority(), m2.priority()))
                 .forEach(ModuleStarter::start);
  
      }
docs: Preload Module.xml files.