Results 1 to 3 of 3

Thread: stop step execution

  1. #1
    Join Date
    Sep 2012
    Posts
    3

    Default 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. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    351

    Default

    In Spring Batch 1, there are a few ways to stop a job: http://static.springsource.org/sprin...x.html#d0e4542. 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.
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

  3. #3
    Join Date
    Oct 2012
    Location
    Madrid
    Posts
    20

    Default

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

Posting Permissions

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