Fix LockTimeoutPropertyTest

This commit is contained in:
Andrea Boriero 2016-05-03 11:30:22 +01:00 committed by Steve Ebersole
parent 71009d0da4
commit 71f69b09a6
2 changed files with 10 additions and 1 deletions

View File

@ -571,7 +571,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
}
initQueryFromNamedDefinition( query, queryDefinition );
applyQuerySettingsAndHints( query );
// applyQuerySettingsAndHints( query );
return query;
}

View File

@ -289,6 +289,7 @@ public final class SessionImpl
private void applyProperties() {
applyEntityManagerSpecificProperties();
setHibernateFlushMode( ConfigurationHelper.getFlushMode( properties.get( AvailableSettings.FLUSH_MODE ), FlushMode.AUTO ) );
setLockOptions( this.properties, this.lockOptions );
getSession().setCacheMode(
@ -299,6 +300,14 @@ public final class SessionImpl
);
}
private void applyEntityManagerSpecificProperties() {
for ( String key : ENTITY_MANAGER_SPECIFIC_PROPERTIES ) {
if ( getFactory().getProperties().containsKey( key ) ) {
this.properties.put( key, getFactory().getProperties().get( key ) );
}
}
}
protected void applyQuerySettingsAndHints(Query query) {
if ( lockOptions.getLockMode() != LockMode.NONE ) {
query.setLockMode( getLockMode( lockOptions.getLockMode() ) );