
Originally Posted by
LionelFromParis
Hello,
I have a ItemWriter using a Dao to insert records in database.
I built the writer like the TradeWriter from Spring-batch samples and use an existing dao (from my projet) based on Hibernate.
Everything works fine and i really appreciate Spring-batch
However, there is a problem when i try to test an exception from the writer.
Chunk commit interval = 100
I increment a counter for each item write in DB and send Exception after 40 records.
The BATCH_STEP_EXECUTION (which is correct) indicates :
READ_COUNT=100,
WRITE_COUNT=0,
ROLLBACK_COUNT=1
But I still have 40 records in my database ... which means that the rollback didn't run through the dao.
Do you have a clue about what i did wrong ???
Thanks for help