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();
|
return builder.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (PersistenceException pe) {
|
|
||||||
throw pe;
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
log.debug( "Unable to build entity manager factory", e );
|
log.debug( "Unable to create EntityManagerFactory", e );
|
||||||
throw new PersistenceException( "Unable to build entity manager factory", e );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName, Map properties) {
|
protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName, Map properties) {
|
||||||
|
|
Loading…
Reference in New Issue