[hibernate-dev] Feature proposal: Add Session-level batch size configuration

Steve Ebersole steve at hibernate.org
Wed Nov 4 13:56:38 EST 2015


At the moment Hibernate builds all of the Loaders that derive from
batchsize when the SessionFactory is built.  So practically speaking you'd
have to account for that change in design.

But in general the idea would be ok.


On Wed, Nov 4, 2015 at 12:05 PM Vlad Mihalcea <mihalcea.vlad at gmail.com>
wrote:

> Hi,
>
> I was browsing the Hibernate code and realized that the Batch/Non-Batch
> decision is taken based on the value of the "hibernate.jdbc.batch_size"
> SessionFactory configuration.
> Wouldn't be more flexible if we allow the Session to have a setBathSize(int
> size) method to override the batching configuration on a Session-basis.
> This way we can fine-tune the batch size for each particular DAO method.
>
> Any thoughts?
>
> Vlad
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list