NamedParameterJdbcTemplate batch size
Is there a way to set the batch size for Spring's
NamedParameterJdbcTemplate object?
I ran into some OutOfMemory issues in my project but I was able to resolve
it by calling NamedParameterJdbcTemplate in a loop of smaller chunks. But
this required some extra effort like deciding the chunk size, breaking a
big List into smaller sublists etc.
I was wondering if NamedParameterJdbcTemplate has any such direct way by I
can specify the batch size for it. I do not see anything though in the API
documentation. But they have something in JDBCTemplate. Now if I have to
switch to JDBCTemplate I will have to redo my code :(
Please suggest.
No comments:
Post a Comment