<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
						http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd
						http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
	<job id="job1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
		<step id="step1" next="step2">
			<listeners>
				<listener ref="springItemListener" />
			</listeners>
			<chunk checkpoint-policy="item" item-count="2">
				<reader ref="generatingItemReader1" />
				<processor ref="countingItemProcessor" />
				<writer ref="sysoutItemWriter" />
			</chunk>
		</step>
		<step id="step2" next="step3">
			<listeners>
				<listener ref="jsrItemListener" />
			</listeners>
			<chunk checkpoint-policy="item" item-count="2">
				<reader ref="generatingItemReader2" />
				<processor ref="countingItemProcessor" />
				<writer ref="sysoutItemWriter" />
			</chunk>
		</step>
		<step id="step3">
			<listeners>
				<listener ref="springItemListener" />
				<listener ref="jsrItemListener" />
			</listeners>
			<chunk checkpoint-policy="item" item-count="2">
				<reader ref="generatingItemReader3" />
				<processor ref="countingItemProcessor" />
				<writer ref="sysoutItemWriter" />
			</chunk>
		</step>
	</job>
	                
	<bean id="transactionManager" class="org.springframework.batch.support.transaction.ResourcelessTransactionManager"/>
	
	<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
		<property name="jobRepository" ref="jobRepository"/>
	</bean>
	
	<bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean"/>
	
	<bean id="generatingItemReader1" class="org.springframework.batch.item.support.ListItemReader">
		<constructor-arg>
			<list>
				<value>One</value>
				<value>Two</value>
			</list>
		</constructor-arg>
	</bean>
	
	<bean id="generatingItemReader2" class="org.springframework.batch.item.support.ListItemReader">
		<constructor-arg>
			<list>
				<value>Three</value>
				<value>Four</value>
			</list>
		</constructor-arg>
	</bean>
	
	<bean id="generatingItemReader3" class="org.springframework.batch.item.support.ListItemReader">
		<constructor-arg>
			<list>
				<value>Five</value>
				<value>Six</value>
			</list>
		</constructor-arg>
	</bean>
	
	<bean id="countingItemProcessor" class="org.springframework.batch.core.jsr.configuration.xml.CountingItemProcessor"/>
	
	<bean id="sysoutItemWriter" class="org.springframework.batch.item.adapter.ItemWriterAdapter">
		<property name="targetObject">
			<util:constant static-field="java.lang.System.out"/>
		</property>
		<property name="targetMethod" value="println"/>
	</bean>
	
	<bean id="springItemListener" class="org.springframework.batch.core.jsr.configuration.xml.ItemListenerParsingTests.SpringItemListener"/>

	<bean id="jsrItemListener" class="org.springframework.batch.core.jsr.configuration.xml.ItemListenerParsingTests.JsrItemListener"/>
</beans>
