// Set indicator that loading failed
descriptorCache.put(cls, new Boolean(false));
if ((flags & ODM_THROW_ERROR) != 0)
{
throw new XMLDriverException("Object descriptor resource '" + descriptorFileName + "' not found for class '" + className + "'");
}
return null;
}
// Load the mapping from the resource
try
{
descriptor = (ObjectDescriptor) XMLDriver.getInstance().deserializeStream(ObjectDescriptor.class, is);
}
catch (XMLDriverException pe)
{
// Set indicator that loading failed
descriptorCache.put(cls, new Boolean(false));
throw new XMLDriverException("Error loading object descriptor resource for class '" + className + "'", pe);
}
// Set the class and class name in the descriptor
descriptor.setObjectClass(cls);
descriptor.setObjectClassName(cls.getName());