2
votes

I implemented a spring batch framework with reader, processor, writer. the batch framework initiates a transaction and commit interval is for every 50 records say.

Now within my reader or processor if i dont want to wait for some update or insert statement to wait until commit interval is reached , and want to commit right there is it possible?

It can re framed like how to commit only specific records before commit interval is reached in a spring batch transaction.

I am using ibatis, oracle11g. I tried to commit transactions from my ibatis SQL Template and couldnt see the commit happening.

1

1 Answers

4
votes

You can achieve this using Requires New transaction propagation. This way you can commit some data changes no matter whether you commit or roll back the main transaction later.