Feb 13th, 2008, 08:57 AM
Use of JDBC batchUpdate size instead of commitInterval
We use spring-batch-1.0.0.m3 to run our jobs for inserting data from flat files into the database tables. We figured out that running iBatis batchUpdate inserting data from a flat file performs several times faster (I read even a post in this forum on the same issue) than an ordinary insert with commitInterval set via spring-batch job configuration. So the question is how to implement a job that will utilize iBatis batchUpdate (and its batchSize) instead of using insert in a jobProcessor and commiting via spring-batch. If you are supposed to support this feature in the future please let us know which build/release it will be available in.
Feb 13th, 2008, 12:55 PM
It's doable even now, and I know a few projects that have done it with hibernate. You still absolutely want spring batch to manage the transaction size, but all you really need to be notified before the transaction is committed and actually writing out. You could use the TransactionSynchronization manager for this, or aop, or a repeatlistener.