// Install versioned marshalling configuration
InjectedValue<ModuleDeployment> deployment = new InjectedValue<>();
Module module = unit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE);
Value<ModuleLoader> moduleLoader = new ImmediateValue<>(module.getModuleLoader());
target.addService(VersionedMarshallingConfigurationService.getServiceName(name), new VersionedMarshallingConfigurationService(deployment, moduleLoader))
.addDependency(name.append(ModuleDeployment.SERVICE_NAME), ModuleDeployment.class, deployment)
.setInitialMode(ServiceController.Mode.ON_DEMAND)
.install()
;
}