Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Stoping -Spring batch Job

  1. #21
    Join Date
    Dec 2010
    Posts
    20

    Default

    2.0.4 - version

  2. #22
    Join Date
    Dec 2010
    Posts
    20

    Default

    Today i upgraded to version 2.1.5 Release version of Spring batch ,,,

    Still my issue continues ..

    Enclosed is my config file .
    Attached Files Attached Files

  3. #23
    Join Date
    Jun 2005
    Posts
    4,231

    Default

    Note that 2.1.6 is the latest. It works for me. Maybe you can try with a simple fake sample (e.g. the simple-cli) and check you can make that work?

  4. #24
    Join Date
    Dec 2010
    Posts
    20

    Default

    I used simple-cli example for testing purpose ..

    from a command prompt gave below command

    mvn exec:java -Dexec.mainClass=org.springframework.batch.core.lau nch.support.CommandLineJobRunner -Dexec.args="launch-context.xml job1 run.id=2"

    job started running and printing o/p on consloe .

    Now i opened one more command prompt window fro same path and gave below command

    mvn exec:java -Dexec.mainClass=org.springframework.batch.core.lau nch.support.CommandLineJobRunner -Dexec.args="launch-context.xml job1 run.id=2 -stop"


    This command i was expecting to stop the job running . but it was not stopped . Am i going wrong some where???

  5. #25
    Join Date
    Jun 2005
    Posts
    4,231

    Default

    What happened with the simple cli (any exception, or you just didn't see the job stop)? It won't be using a shared database by default, so it's no surprise if you haven't changed the database configuration.

    For your original problem, the -stop flag was never supported in Batch 2.0, and you mentioned you had been using 2.0.4, so I would check very carefully that you don't have older versions on the jars on your classpath by mistake.

  6. #26
    Join Date
    Jun 2010
    Posts
    23

    Default Stoping a Batch Process

    Hi All,

    Stop the process with a click of a button

    I invoke the batch process from gui by click of a button .

    The Control Moves from Spring Controller-Quartzs Scheduler-then the batch process gets invoked form Quartz -Execute method invokes batch process ,
    I am using WebSphere as application server ,
    Can any one help me in deriving a solution to stop the batch process through screens(gui).

  7. #27
    Join Date
    Jun 2005
    Posts
    4,231

  8. #28
    Join Date
    Dec 2010
    Posts
    20

    Default

    Hi Dave

    I was able to see job stopping using the Junit test case .. where job will be stopped after few seconds ..

    But when i use a command prompt to stop a job .

    I see an Error saying thier is no job running for the joblauncher job1.

    As i digged log :

    Found that when i run a job using a test case in the job parameter list it shows the job running id and excutes the job ..
    But when i use a command prompt in job parmeter is empy ..

    is their any changes i have to make to the command so that it can take jobparemeters id ?

    I am using the same db which has been used in example.

Posting Permissions

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