<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/batch" xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">

	<beans:import resource="common-context.xml" />

	<step id="stepParent" abstract="true" xmlns="http://www.springframework.org/schema/batch">
		<tasklet>
			<chunk skip-limit="1">
				<skippable-exception-classes>
					<include class="java.lang.Exception" />
				</skippable-exception-classes>
			</chunk>
		</tasklet>
	</step>

	<job id="job">
		<step id="s1" parent="stepParent">
			<tasklet>
				<chunk reader="reader" writer="writer" processor="processor" commit-interval="1"
					skip-policy="skipPolicy"/>
			</tasklet>
		</step>
	</job>

	<bean id="skipPolicy" class="org.springframework.batch.core.step.skip.LimitCheckingItemSkipPolicy" xmlns="http://www.springframework.org/schema/beans"
		scope="step">
		<property name="skipLimit" value="#{jobParameters['skip.limit']}" />
		<property name="skippableExceptionMap">
			<map key-type="java.lang.Class">
				<entry key="java.lang.Exception" value="true" />
			</map>
		</property>
	</bean>

</beans:beans>