}
// 2. make sure we've got the definition of the specified node type
QNodeTypeDefinition ntd = ntdCache.get(ntName);
if (ntd == null) {
throw new NoSuchNodeTypeException(ntName.toString());
}
// 3. build effective node type
synchronized (entCache) {
try {
ent = getEffectiveNodeType(ntd, ntdCache);
// store new effective node type
entCache.put(ent);
return ent;
} catch (ConstraintViolationException e) {
// should never get here as all known node types should be valid!
String msg = "Internal error: encountered invalid registered node type " + ntName;
log.debug(msg);
throw new NoSuchNodeTypeException(msg, e);
}
}
}