Error Handling and Transactions Flashcards
(10 cards)
How do you configure retry logic in Spring Batch?
By using .faultTolerant().retry(Exception.class).retryLimit(3).
How do you configure a step to skip exceptions?
Using .skip(Exception.class).skipLimit(5).
How do you configure a step to fail on specific exceptions?
By using .noSkip(SpecificException.class).
What is SkipPolicy?
A policy that determines which exceptions should be skipped.
What is RetryPolicy?
A policy that defines retry logic for transient failures.
How can you log failed records in Spring Batch?
By implementing a custom SkipListener.
What is a RetryTemplate?
A Spring utility for handling retries outside of batch steps.
How do you configure a retryable writer?
By using .faultTolerant().retry(SomeException.class).retryLimit(3).
How do you define a custom SkipPolicy?
By implementing the SkipPolicy interface.
How can you ignore certain exceptions in a step?
By using .noRollback(Exception.class).