Results 1 to 2 of 2

Thread: Job Not Stopping

  1. #1
    Join Date
    Jul 2008
    Posts
    21

    Default Job Not Stopping

    I am trying to stop a job using a custom exit status set in a step execution listener. However, the job does not stop as expected. The job continues to execute step2 even though the step execution exit code is reported as "STOPPED_FOR_PAUSE".

    Can anyone point me to what I am doing wrong? This looks like it should work based on the docs.

    Thanks,

    Alejandro

    Code:
    	<job id="job2" xmlns="http://www.springframework.org/schema/batch"
    		restartable="true">
    		
    		<step id="step1" >		
    			<tasklet ref="tasklet1" transaction-manager="transactionManager">
    				<batch:listeners>
    					<batch:listener class="StepExecListener" />
    				</batch:listeners>
    			</tasklet>
    			<batch:stop on="STOPPED_FOR_PAUSE" restart="step2"/>
    		</step>
    		<step id="step2">
    			<tasklet ref="tasklet2" transaction-manager="transactionManager">
    			</tasklet>			
    		</step>
    	</job>

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

    Default

    It works for me. I just added a test (https://fisheye.springsource.org/cha...batch/?cs=3517), so maybe you can see from that what you are doing differently?

Posting Permissions

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