Based on this mailing list discussion, it would be useful to configure the batch size on a Session level so that the batch size is configurable per business use case. So, probably the Session could define setBatchSize(int batchSize) and getBatchSize() methods, which will overwrite the default global batch size given by the hibernate.jdbc.batch_size configuration property. |