Spring Batch Stax XML reading job is not ending when out of input
I'm using Spring Batch to set up a job that will process a potentially very large XML file. I think I've set it up appropriately, but at runtime I'm finding that the job runs, processes its input, and then just hangs in an executing state (I can confirm by viewing the JobExecution's status in the JobRepository).I've read through the Batch documentation several times but I don't see any obvious "make the job stop when out of input" configuration that I'm missing.
Here's the relevant portion of my application context:
<job id="pickupDataExtractionJob" xmlns="http://www.springframework.org/schema/batch">
<step id="read" next="write">
<tasklet>
<chunk reader="jdbcItemReader" writer="xmlItemWriter" commit-interval="5" retry-limit="3" >
<retryable-exception-classes>
<include class="java.lang.Exception"/>
<include class="java.sql.SQLException"/>
<include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
</retryable-exception-classes>
</chunk>
</tasklet>
</step>
<step id="write" next="rename">
<tasklet>
<chunk reader="xmlItemReader" writer="jdbcItemWriter" commit-interval="5" retry-limit="3" >
<retryable-exception-classes>
<include class="java.io.FileNotFoundException"/>
<include class="java.sql.SQLException"/>
<include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
</retryable-exception-classes>
</chunk>
</tasklet>
</step>
<step id="rename" next="deleteDir">
<tasklet ref="renameTaskLet" />
</step>
<!-- <step id="email" next="deleteDir">
<tasklet ref="emailTaskLet" />
</step> -->
<step id="deleteDir">
<tasklet ref="fileDeletingTasklet" />
</step>
<listeners>
<listener ref="processShutdownListener"></listener>
</listeners>
</job>
<bean id="renameTaskLet"
class="com.kewill.bluedart.pos.batch.tasklet.SimpleRenameFileTaskletStep" />
<bean id="emailTaskLet" class="com.kewill.bluedart.pos.batch.tasklet.SendEMailTasklet" />
<bean id="fileDeletingTasklet" class="com.kewill.bluedart.pos.batch.tasklet.FileDeletingTasklet">
<property name="directory" value="file:${batch.path}" />
</bean>