字段 Settings.jdbcBatchSize 好像没有用到,实际配置用在其他地方。我下载了 hibernate-core 的源代码,通过文本搜索可以找到 Environment.STATEMENT_BATCH_SIZE 在某些地方使用。
看看 org.hibernate.engine.jdbc.batch.internal.BatchBuilderImpl.java
文本搜索的结果
Search "STATEMENT_BATCH_SIZE" (23 hits in 22 files)
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\cfg\AvailableSettings.java (1 hit)
Line 190: public static final String STATEMENT_BATCH_SIZE = "hibernate.jdbc.batch_size";
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\cfg\ExternalSessionFactoryConfig.java (1 hit)
Line 281: setUnlessNull( props, Environment.STATEMENT_BATCH_SIZE, jdbcBatchSize );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\cfg\SettingsFactory.java (1 hit)
Line 114: int batchSize = ConfigurationHelper.getInt(Environment.STATEMENT_BATCH_SIZE, properties, 0);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\AbstractTransactSQLDialect.java (1 hit)
Line 125: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\Cache71Dialect.java (2 hits)
Line 258: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
Line 259: //getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\CUBRIDDialect.java (1 hit)
Line 76: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\DB2Dialect.java (1 hit)
Line 177: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, NO_BATCH );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\H2Dialect.java (1 hit)
Line 191: getDefaultProperties().setProperty( AvailableSettings.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\HSQLDialect.java (1 hit)
Line 219: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\InterbaseDialect.java (1 hit)
Line 59: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\JDataStoreDialect.java (1 hit)
Line 60: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\MckoiDialect.java (1 hit)
Line 81: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, NO_BATCH);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\MimerSQLDialect.java (1 hit)
Line 136: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, "50");
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\MySQLDialect.java (1 hit)
Line 182: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\Oracle8iDialect.java (1 hit)
Line 200: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\Oracle9Dialect.java (1 hit)
Line 87: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\PostgreSQL81Dialect.java (1 hit)
Line 154: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\SAPDBDialect.java (1 hit)
Line 136: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\TeradataDialect.java (1 hit)
Line 110: getDefaultProperties().setProperty( Environment.STATEMENT_BATCH_SIZE, NO_BATCH );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\dialect\TimesTenDialect.java (1 hit)
Line 84: getDefaultProperties().setProperty(Environment.STATEMENT_BATCH_SIZE, DEFAULT_BATCH_SIZE);
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\engine\jdbc\batch\internal\BatchBuilderImpl.java (1 hit)
Line 55: size = ConfigurationHelper.getInt( Environment.STATEMENT_BATCH_SIZE, configurationValues, size );
C:\Documents and Settings\cfweber\Desktop\hibernate\core\org\hibernate\engine\jdbc\batch\internal\BatchBuilderInitiator.java (1 hit)
Line 55: ConfigurationHelper.getInt( Environment.STATEMENT_BATCH_SIZE, configurationValues, 1 )