File file = resource.getFile();
if (!file.isDirectory()) {
throw new IllegalArgumentException(
"Mapping directory location [" + resource + "] does not denote a directory");
}
config.addDirectory(file);
}
}
// Tell Hibernate to eagerly compile the mappings that we registered,
// for availability of the mapping information in further processing.