Hi,
I am writing 10 items, in chunks of 3 each.
Configuration:
- Oracle 11g enterprise
- Transaction propogation=REQUIRED
- Skip all exceptions (java.lang.exception)
- Reader is JdbcCursorItemReader
- Item #3 is a delibrate failure, which will throw an exception.
Expected Result
- Item #1 and Item #2 from Chunk #1 will get written.
- Item #3 will fail insert, causing Chunk #1 to Roll back.
- Spring Batch will trigger the writer 3 times separately for Item #1, Item #2 and Item #3
- Item #3 will again fail insert and will be skipped.
Actual Result
- Chunk #1 is getting rolled back; BUT; is not retried again.
- Job Continues and writes Chunk #2,Chunk #3 and Chunk #4
The above behaviour is not observed when i try on Oracle XE; (with the same codeset); in this case, the expected outcome is observed.
Any particular configuration needs to be applied to Oracle 11g ?
[Meta Information]
BATCH_STEP_EXECUTION
Commit_COUNT=2, READ_COUNT=10, WRITE_COUNT=7, ROLLBACK_COUNT=1, EXIT_CODE=COMPLETED
Regards,
Pravin



Reply With Quote
