Results 1 to 3 of 3

Thread: Unable to Register Job in Job Registry

  1. #1
    Join Date
    Dec 2008
    Posts
    18

    Question Unable to Register Job in Job Registry

    I'm using 2.0.0.M4 and have defined a job in a file name historicalJob.xml as follows:

    Code:
    <job id="historicalJob">
      <step name="stepA" tasklet="historicalDownloadTasklet" next="stepB" />
      <step name="stepB" reader="historicalReader" writer="historicalWriter" next="stepC" />
      <step name="stepC" tasklet="historicalFileProcessedTasklet" />
    </job>
    In the main spring application context file, I have defined the JobRegistryBeanPostProcessor.

    I load both of these files in a ContextLoaderListener in a web.xml, but the historicalJob does not get registered with the JobRegistry.

    Is there something that I am missing in getting the job registered with the JobRegistry?

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    Both the post processor and the Job are defined in the same ApplicationContext, right? How are you sure that it is not being registered?

  3. #3
    Join Date
    Dec 2008
    Posts
    18

    Default

    I was able to resolve the issue. It was a Spring configuration issue. The pattern I used to locate the jobs was not correct in the ContextLoaderListener.

    I actually have the post processor defined in the main *-servlet.xml file, and the jobs listed in seperate files, all loaded by the ContextLoaderListener, and the post processor is loading them in the registry just fine.

Posting Permissions

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