Results 1 to 4 of 4

Thread: Backoff policy configuration with namespace?

  1. #1
    Join Date
    Jan 2009
    Posts
    5

    Default 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. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    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.

  3. #3
    Join Date
    Jan 2009
    Posts
    5

    Default

    Quote 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?

  4. #4
    Join Date
    Apr 2008
    Location
    Philadelphia, US
    Posts
    198

    Arrow

    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
    Humans are stateful and mutable beings that have no problems processing many things concurrently and share state with others + they are usually "coupled"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •