Announcement Announcement Module
Collapse
No announcement yet.
Does Spring batch support nested jobs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Spring batch support nested jobs

    I need to run a new job inside the step of a job. And org.springframework.transaction.UnexpectedRollback Exception: Transaction rolled back because it has been marked as rollback-only may always happen if the new job has exception on it. How can I solve this problem?

  • #2
    How did you configure that? It should work if you use the JobStep (http://static.springsource.org/sprin...external-flows).
    Last edited by Dave Syer; Aug 12th, 2010, 03:09 AM. Reason: Punctuation

    Comment


    • #3
      ok. I solve it . Thanks

      Comment


      • #4
        If you have both jobs defined in same xyz.xml file then

        <job id="Entity-Attributes">
        <step id="DeleteEntityAttributesStep">
        <job ref="EntityJob" />
        </step>
        </job>

        If Both jobs are in different xmls file then<import resource="abc.xml"/>
        <job id="Entity-Attributes">
        <step id="DeleteEntityAttributesStep">
        <job ref="EntityJob" />
        </step>
        </job>

        Please take care of loading abc.xml because when you import in xyz.xml, then abc.xml jobs are already registered so you might get already registered exceptions for jobs in abc.xml.

        Comment

        Working...
        X