code: @Override
      public void initialize(ExtensionContext context) {
          ROOT_LOGGER.debug("Initializing Deployment Scanner Extension");
  
          if (context.getProcessType().isHostController()) {
              throw DeploymentScannerLogger.ROOT_LOGGER.deploymentScannerNotForDomainMode();
          }
  
          final SubsystemRegistration subsystem = context.registerSubsystem(CommonAttributes.DEPLOYMENT_SCANNER, CURRENT_VERSION);
          subsystem.registerXMLElementWriter(DeploymentScannerParser_2_0::new);
  
          final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new DeploymentScannerSubsystemDefinition());
          registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
          final ManagementResourceRegistration scanner = registration.registerSubModel(new DeploymentScannerDefinition(context.getPathManager()));
          if (context.getProcessType().isServer()) {
              final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager())
                      .setRelativeToAttribute(DeploymentScannerDefinition.RELATIVE_TO)
                      .setPathAttribute(DeploymentScannerDefinition.PATH)
                      .build();
              scanner.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
          }
      }
docs: {@inheritDoc}