getPersistentTypeNames(false, envLoader);
URL xml = findXML(cls);
// we have to parse metadata up-front to register persistence unit
// defaults and system callbacks
ClassMetaData meta;
boolean parsedXML = false;
if (_unparsed != null && !_unparsed.isEmpty()
&& (mode & MODE_META) != 0) {
Set<URL> unparsed = new HashSet<URL>(_unparsed);
for (URL url : unparsed) {
parseXML(url, cls, mode, envLoader);
}
parsedXML = unparsed.contains(xml);
_unparsed.clear();
// XML process check
meta = repos.getCachedMetaData(cls);
if (meta != null && (meta.getSourceMode() & mode) == mode) {
validateStrategies(meta);
return;
}
}
// might have been looking for system-level query
if (cls == null)
return;
// we may still need to parse XML if this is a redeploy of a class, or
// if we're in strict query-only mode
if (!parsedXML && xml != null) {
parseXML(xml, cls, mode, envLoader);
// XML process check
meta = repos.getCachedMetaData(cls);
if (meta != null && (meta.getSourceMode() & mode) == mode) {
validateStrategies(meta);
return;
}
}
AnnotationPersistenceMetaDataParser parser = getAnnotationParser();
parser.setEnvClassLoader(envLoader);
parser.setMode(mode);
parser.parse(cls);
meta = repos.getCachedMetaData(cls);
if (meta != null && (meta.getSourceMode() & mode) == mode)
validateStrategies(meta);
}