public synchronized Morphia mapPackage(final String packageName, final boolean ignoreInvalidClasses) {
try {
for (final Class clazz : ReflectionUtils.getClasses(packageName)) {
try {
final Embedded embeddedAnn = ReflectionUtils.getClassEmbeddedAnnotation(clazz);
final Entity entityAnn = ReflectionUtils.getClassEntityAnnotation(clazz);
final boolean isAbstract = Modifier.isAbstract(clazz.getModifiers());
if ((entityAnn != null || embeddedAnn != null) && !isAbstract) {
map(clazz);
}
} catch (final MappingException ex) {