Result result = getInitializedResult();
result.setStatus(Result.PASSED);
addErrorDetails(result, getVerifierContext().getComponentNameConstructor());
PersistenceUnitDescriptor pu = PersistenceUnitDescriptor.class.cast(descriptor);
List<String> mappingFileNames = new ArrayList<String>(pu.getMappingFiles());
for (String mappingFileName : mappingFileNames) {
if(getVerifierContext().getClassLoader().getResource(mappingFileName) == null) {
result.failed(smh.getLocalString(
getClass().getName() + "failed",
"Mapping file [ {0} ] specified in persistence.xml does not exist in the application.",
new Object[]{mappingFileName}));
}
}
return result;