*/
public ServiceDomain createDomain(QName domainName, SwitchYardModel switchyardConfig) {
TransformerRegistry transformerRegistry = new BaseTransformerRegistry();
ValidatorRegistry validatorRegistry = new BaseValidatorRegistry();
SwitchYardCamelContextImpl camelContext = new SwitchYardCamelContextImpl();
CamelExchangeBus bus = new CamelExchangeBus(camelContext);
ServiceDomainSecurity serviceDomainSecurity = getServiceDomainSecurity(switchyardConfig);
DomainImpl domain = new DomainImpl(
domainName, _registry, bus, transformerRegistry, validatorRegistry, _eventManager, serviceDomainSecurity);
camelContext.setServiceDomain(domain);
// set properties on the domain
Map<String, String> properties = getDomainProperties(switchyardConfig);
for (Map.Entry<String, String> property : properties.entrySet()) {
domain.setProperty(property.getKey(), property.getValue());