Announcement Announcement Module
No announcement yet.
stop step execution Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • stop step execution

    I am using spring batch 1.2.1 & jdk 1.4 & weblogic 8.1

    I have reader; it always checks the table, process the unprocessed record and writer; writes into table.

    Only one step is doing this task and it step is executing continuously. It is like 24*7 job.

    I have to provide GUI to stop the JOB. Please suggest…

    How to stop the existing step execution abruptly from another job?

    Thanks in Advance

  • #2
    In Spring Batch 1, there are a few ways to stop a job: They work around three different ideas:
    1. Set a flag somewhere that your step checks prior to execution.
    2. Returning null from the ItemReader.
    3. Set the TerminationOnly flag that is checked by the framework.
    If you're going to be shutting this down from an external service/application, I'd recommend option 1.


    • #3
      You can send a parameter to this job and throw a JobInterruptedException().