ParentPolicyMetaData ppmd = deployment.getParentPolicy();
ParentPolicy pp = (ppmd != null) ? ppmd.createParentPolicy() : ParentPolicy.BEFORE;
Loader parent = null;
String parentDomain = deployment.getParentDomain();
LoaderMetaData lmd = deployment.getParent();
if (parentDomain != null && lmd != null)
throw new DeploymentException("Cannot define both: parent-domain and parent loader: " + deployment);
if (lmd != null)
{
parent = lmd.getValue();
}
else if (parentDomain != null)
{
parent = system.getDomain(parentDomain);
}