if (name == null)
return null;
String domain = name.getCanonicalName().trim();
if (domain.length() == 0)
return null;
ClassLoadingMetaData metaData = new ClassLoadingMetaData();
metaData.setName(deploymentName);
metaData.setDomain(domain);
metaData.setExportAll(ExportAll.NON_EMPTY);
metaData.setImportAll(true);
metaData.setVersion(Version.DEFAULT_VERSION);
Properties props = new Properties();
String config = loaderConfig.repositoryConfig;
try
{
if (config != null)
{
ByteArrayInputStream bais = new ByteArrayInputStream(config.getBytes());
props.load(bais);
}
}
catch (Exception e)
{
throw DeploymentException.rethrowAsDeploymentException("Error parsing repository config " + config, e);
}
String java2ParentDelegation = props.getProperty("java2ParentDelegation");
// Check for previous mis-spelled property name
if( java2ParentDelegation == null )
java2ParentDelegation = props.getProperty("java2ParentDelegaton");
boolean useParentFirst = parentDelegation;
if (java2ParentDelegation != null)
useParentFirst = Boolean.valueOf(java2ParentDelegation);
metaData.setJ2seClassLoadingCompliance(useParentFirst);
return metaData;
}