HHH-12101 - Make sure Hibernate returns null on failed attempt to create EMF
This commit is contained in:
parent
447dc1d44e
commit
29d5b41700
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue