Using Spring Batch's JDBCTemplate, I am trying to write data on Oracle DB. Is there any failover mechanism which can help me to process other requests if one query fails to execute ?
Asked
Active
Viewed 68 times
0
-
Possible duplicate of [Spring Batch skip exception for ItemWriter](https://stackoverflow.com/questions/22522681/spring-batch-skip-exception-for-itemwriter) – Mahmoud Ben Hassine May 09 '19 at 07:16
-
@MahmoudBenHassine: it didn't but found solution with SkipPolicy. – Ashish Goel May 09 '19 at 11:58
1 Answers
0
Catch the exception in your batch writer and log as bad records instead of throwing the exception. This will allow next chunk/batch to execute.

Tech Guy
- 417
- 2
- 7
- 23
-
Well... I had earlier done that but it didn't seem elegant as a generic approach to undertake. – Ashish Goel May 13 '19 at 06:42