mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
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 EntityManagerFactory createEntityManagerFactory(String persistenceUnitNam
|
||||
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…
x
Reference in New Issue
Block a user