HHH-9990 - Enabled batched updates for versioned data by default

This commit is contained in:
Andrea Boriero 2015-08-05 10:10:22 +01:00
parent d905246c6a
commit 4da260b3be
15 changed files with 6 additions and 32 deletions

View File

@ -21,9 +21,6 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true

View File

@ -21,9 +21,6 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true

View File

@ -21,9 +21,6 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true

View File

@ -24,6 +24,3 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true

View File

@ -540,9 +540,9 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
final Map configurationSettings = new HashMap();
//noinspection unchecked
configurationSettings.putAll( cfgService.getSettings() );
//noinspection unchecked
configurationSettings.putAll( jdbcServices.getJdbcEnvironment().getDialect().getDefaultProperties() );
//noinspection unchecked
configurationSettings.putAll( cfgService.getSettings() );
cfgService = new ConfigurationServiceImpl( configurationSettings );
( (ConfigurationServiceImpl) cfgService ).injectServices( (ServiceRegistryImplementor) serviceRegistry );
@ -666,7 +666,7 @@ public class SessionFactoryBuilderImpl implements SessionFactoryBuilderImplement
this.jdbcBatchSize = 0;
}
this.jdbcBatchVersionedData = ConfigurationHelper.getBoolean( BATCH_VERSIONED_DATA, configurationSettings, false );
this.jdbcBatchVersionedData = ConfigurationHelper.getBoolean( BATCH_VERSIONED_DATA, configurationSettings, true );
this.scrollableResultSetsEnabled = ConfigurationHelper.getBoolean(
USE_SCROLLABLE_RESULTSET,
configurationSettings,

View File

@ -18,6 +18,7 @@ import org.hibernate.dialect.pagination.SQL2008StandardLimitHandler;
public class Oracle12cDialect extends Oracle10gDialect {
public Oracle12cDialect() {
super();
getDefaultProperties().setProperty( Environment.BATCH_VERSIONED_DATA, "true" );
}
@Override

View File

@ -254,6 +254,7 @@ public class Oracle8iDialect extends Dialect {
// be returned (via its RETURNING clause). No other driver seems to
// support this overloaded version.
getDefaultProperties().setProperty( Environment.USE_GET_GENERATED_KEYS, "false" );
getDefaultProperties().setProperty( Environment.BATCH_VERSIONED_DATA, "false" );
}
@Override

View File

@ -81,6 +81,7 @@ public class Oracle9Dialect extends Dialect {
getDefaultProperties().setProperty( Environment.USE_GET_GENERATED_KEYS, "false" );
getDefaultProperties().setProperty( Environment.USE_STREAMS_FOR_BINARY, "true" );
getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
getDefaultProperties().setProperty( Environment.BATCH_VERSIONED_DATA, "false" );
registerFunction( "abs", new StandardSQLFunction( "abs" ) );
registerFunction( "sign", new StandardSQLFunction( "sign", StandardBasicTypes.INTEGER ) );

View File

@ -21,9 +21,6 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true

View File

@ -13,6 +13,4 @@ hibernate.connection.pool_size 5
hibernate.cache.region_prefix hibernate.test
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
hibernate.service.allow_crawling=false

View File

@ -21,6 +21,4 @@ hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFa
hibernate.jdbc.batch_size 0
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
hibernate.service.allow_crawling=false

View File

@ -18,6 +18,4 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
hibernate.service.allow_crawling=false

View File

@ -18,6 +18,4 @@ hibernate.max_fetch_depth 5
hibernate.generate_statistics true
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
hibernate.service.allow_crawling=false

View File

@ -20,9 +20,6 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true
javax.persistence.validation.mode=NONE
hibernate.service.allow_crawling=false
hibernate.session.events.log=true

View File

@ -20,6 +20,3 @@ hibernate.max_fetch_depth 5
hibernate.cache.region_prefix hibernate.test
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle
hibernate.jdbc.batch_versioned_data true