Hello All,
I believe I should provide transaction configurations for my DAO in order for it to rollback if the process failed in the middle. Here is my question:
I started with a job to read from a file and write it to a database. I set the commitInterval to be 5000. There were about 60,000 records in that file and I purposefully stopped the process in the middle when the commitCount in my BATCH_STEP_EXECUTION was 6 and item_Count was 30,000.
In theory when I look at this number, I would assume that 30,000 records were read and saved to the database. But in my table I could find little more than 30,000 records.
I am assuming it is just because I didnt declare any transaction for my business DAO, it didnt rollback those extra records. If my job is restartable, what would happen in this case, the job will start reading from 30,001th record? I hope yes, but in that case, it may throw data integrity violation rite??
Anyone came across such scenario?
Thanks!


Reply With Quote
