}
// 2. make sure we've got the definition of the specified node type
NodeTypeDef ntd = (NodeTypeDef) ntdCache.get(ntName);
if (ntd == null) {
throw new NoSuchNodeTypeException(ntName.toString());
}
// 3. build effective node type
synchronized (entCache) {
try {
ent = EffectiveNodeType.create(ntd, entCache, ntdCache);
// store new effective node type
entCache.put(ent);
return ent;
} catch (NodeTypeConflictException ntce) {
// 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, ntce);
}
}
}