Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:47:19+00:00 2026-06-03T13:47:19+00:00

Team, I am doing a technical poc for reading records from a flat file

  • 0

Team,

I am doing a technical poc for reading records from a flat file and inserting the data to database.

I am using chunk task and running this job using spring batch admin successfully.

I have to implement the retry policy along with a feature to set the time interval between each retry. I am stuck up with setting the time interval between each retry as chuck doesn’t support it directly. Is there any work around for this?

My code is

<batch:job id="importDataJob" job-repository="jobRepository">
  <batch:step id="importDataStep">
    <batch:tasklet transaction-manager="transactionManager">
      <batch:chunk reader="dataReader" writer="dataWriter"  commit-interval="1" retry-limit="3">
        <batch:retryable-exception-classes>
          <batch:include class="javax.naming.ServiceUnavailableException" />
        </batch:retryable-exception-classes>
      </batch:chunk>
    </batch:tasklet>
  </batch:step>
</batch:job>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:47:20+00:00Added an answer on June 3, 2026 at 1:47 pm

    In your case the configuration will look like:

    Spring Batch 2.x

    <bean id="stepParent" class="org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean" abstract="true">
      <property name="backOffPolicy">
        <bean class="org.springframework.batch.retry.backoff.FixedBackOffPolicy"
          <property name="backOffPeriod" value="2000" />
        </bean>
      </property>
    </bean>
    
    <batch:job id="importDataJob" job-repository="jobRepository">
      <batch:step id="importDataStep" parent="stepParent">
         ...
      </batch:step>
    </batch:job>
    

    Unfortunately, batch namespace does not support setting backOffPolicy directly to step, see BATCH-1441.

    Spring Batch 3.0

    In Spring Batch 3.0 some classes have moved to other packages. This is the the configuration fragment:

    <bean id="stepParent"
      class="org.springframework.batch.core.step.factory.FaultTolerantStepFactoryBean"         
      abstract="true">
    
      <property name="backOffPolicy">
        <bean class="org.springframework.retry.backoff.FixedBackOffPolicy">
          <property name="backOffPeriod" value="2000"/>
        </bean>
      </property>
    
    </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing a blog using blogger for a fundraiser my team is doing.
Say, if the whole team using Git or Mercurial is doing: (example in Mercurial
Our team is looking to switch from using mbunit to mstest, but there appears
I'm doing a kind of roundabout experiment thing where I'm pulling data from tables
When doing larger sites in big business, you most probalbly work in a team
Our team is now beginning to look at jumping from 2.0 to 3.5 and
We're a team of students doing a software project. As some of us don't
I have a client with a subsidiary doing web development using ColdFusion to support
I remember doing this in an older version of Team City in which the
In our team we are using a development, staging and a master branch plus

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.