Announcement Announcement Module
Collapse
No announcement yet.
Job Not Stopping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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?

    Comment

    Working...
    X