Announcement Announcement Module
Collapse
No announcement yet.
Backoff policy configuration with namespace? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backoff policy configuration with namespace?

    Hello,

    I have been using Batch 1.1.4.RELEASE and looking into upgrading to 2.0.3.RELEASE.

    I got all excited about the new batch namespace, however, there doesn't seem to be a way to incorporate backoff policy configuration.

    Have I missed something? Any suggestions?

    Thanks!

  • #2
    I guess backoff policy hasn't been something that a lot of people customize. You can still use a factory bean approach to set up bean definitions for th steps where you need more control, and then bind them into a <job/> via <step parent="..."/>. You could also work around it probably using a retry listener (which has support in the namespace already). If you want more support for it in the namespace, open a JIRA.

    Comment


    • #3
      Originally posted by Dave Syer View Post
      You can still use a factory bean approach to set up bean definitions for th steps where you need more control, and then bind them into a <job/> via <step parent="..."/>.
      I could not bind a step with a parent step that has a backoff policy to a job that is configured using namespace as the step configuration still gets processed by StepParserStepFactoryBean and the following error is thrown:

      Code:
      Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'backOffPolicy' of bean class [org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean]: Bean property 'backOffPolicy' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
      Did you mean do not use namespace at all?

      Comment


      • #4
        Currently 'backOffPolicy' property is not supported by 'namespaced' configuration. Created a JIRA with a patch you can look at/apply to make it work:

        http://jira.springframework.org/browse/BATCH-1441

        Comment

        Working...
        X