HHH-12101 - Make sure Hibernate returns null on failed attempt to create EMF

This commit is contained in:
Steve Ebersole 2017-11-22 15:27:45 -06:00
parent 447dc1d44e
commit 29d5b41700
1 changed files with 3 additions and 5 deletions

View File

@ -58,13 +58,11 @@ public class HibernatePersistenceProvider implements PersistenceProvider {
return builder.build();
}
}
catch (PersistenceException pe) {
throw pe;
}
catch (Exception e) {
log.debug( "Unable to build entity manager factory", e );
throw new PersistenceException( "Unable to build entity manager factory", e );
log.debug( "Unable to create EntityManagerFactory", e );
}
return null;
}
protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName, Map properties) {