code: private void doConfigure() {
          Undertow.Builder builder = Undertow.builder();
  
          // if no configuration method change root handler, simple path->HttpHandler will be used
          // where each HttpHandler is created in separate org.ops4j.pax.web.service.undertow.internal.Context
          HttpHandler rootHandler = path;
  
          URL undertowResource = detectUndertowConfiguration();
          ConfigSource source = ConfigSource.kind(undertowResource);
  
          switch (source) {
              case XML:
                  LOG.info("Using \"" + undertowResource + "\" to configure Undertow");
                  rootHandler = configureUndertow(configuration, builder, rootHandler, undertowResource);
                  break;
              case PROPERTIES:
                  LOG.info("Using \"" + undertowResource + "\" to read additional configuration for Undertow");
                  configureIdentityManager(undertowResource);
                  // do not break - go to standard PID configuration
              case PID:
                  LOG.info("Using \"org.ops4j.pax.url.web\" PID to configure Undertow");
                  rootHandler = configureUndertow(configuration, builder, rootHandler);
                  break;
          }
  
          for (Context context : contextMap.values()) {
              try {
                  context.setSessionPersistenceManager(sessionPersistenceManager);
                  context.setDefaultSessionTimeoutInMinutes(defaultSessionTimeoutInMinutes);
                  context.start();
              } catch (Exception e) {
                  LOG.error("Could not start the servlet context for context path [" + context.getContextModel().getContextName() + "]", e);
              }
          }
  
          builder.setHandler(rootHandler);
          server = builder.build();
      }
docs: Here's where Undertow is being rebuild at {@link Undertow} level (not {@link ServletContainer} level).
  This is were <em>global</em> objects are configured (listeners, global filters, ...)