Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Is it possible to disable spring batch's skip-limit?

I am looking for a way to disable spring batch's skip-limit, I tried specifying a value of "0" for skip-limit, but is not accepting. Here is my use case:

My batch.xml has skip-limit="${limit_val}"

I want to set ${limit_val} to 0, meaning fail on any exception by default. On seeing the failure, I can look at the reason and decide if its ok to skip the record. If skippable, I want to be able to override ${limit_val} with a value of, say 1 and re-run the batch.

Any help on how this can be achieved?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Have you tried using skip-policy property? In chunk under step define skip-policy="mySkipPolicy" and then give definition of skipPolicy bean.

Provide skipPolicy bean implementation by implementing SkipPolicy Interface.

    public class MySkipPolicy implements SkipPolicy
    {
    private int limit;
    public boolean shouldSkip(final Throwable t, final int skipCount) throws SkipLimitExceededException
    {
    return true or false based on skipCount;

    }
    }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!