HHH-12247 Propagate bootstrapping exceptions rather than logging them at DEBUG level

This commit is contained in:
Sanne Grinovero 2018-06-18 15:37:40 +01:00
parent d79d6267d0
commit 2253fad19d
1 changed files with 6 additions and 14 deletions

View File

@ -47,8 +47,6 @@ public class HibernatePersistenceProvider implements PersistenceProvider {
@Override
public EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map properties) {
log.tracef( "Starting createEntityManagerFactory for persistenceUnitName %s", persistenceUnitName );
try {
final EntityManagerFactoryBuilder builder = getEntityManagerFactoryBuilderOrNull( persistenceUnitName, properties );
if ( builder == null ) {
log.trace( "Could not obtain matching EntityManagerFactoryBuilder, returning null" );
@ -58,12 +56,6 @@ public class HibernatePersistenceProvider implements PersistenceProvider {
return builder.build();
}
}
catch (Exception e) {
log.debug( "Unable to create EntityManagerFactory", e );
}
return null;
}
protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName, Map properties) {
return getEntityManagerFactoryBuilderOrNull( persistenceUnitName, properties, null, null );