final String domain = descriptor.getDomain();
ClassLoader parent;
if (StringUtils.isBlank(domain) || DefaultMuleSharedDomainClassLoader.DEFAULT_DOMAIN_NAME.equals(domain))
{
parent = new DefaultMuleSharedDomainClassLoader(getClass().getClassLoader());
}
else
{
// TODO handle non-existing domains with an exception
parent = new MuleSharedDomainClassLoader(domain, getClass().getClassLoader());