<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:integration="http://www.springframework.org/schema/integration"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:batch="http://www.springframework.org/schema/batch"
	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
		http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
		http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

	<import resource="classpath:/simple-job-launcher-context.xml" />

	<integration:channel id="requests" />

	<job id="job" xmlns="http://www.springframework.org/schema/batch">
		<step id="step" parent="delegateStep" />
	</job>

	<bean id="delegateStep" class="org.springframework.batch.integration.step.DelegateStep">
		<property name="delegate" ref="gateway" />
		<property name="jobRepository" ref="jobRepository" />
	</bean>

	<integration:gateway service-interface="org.springframework.batch.core.Step" id="gateway"
		default-request-channel="requests" />

	<integration:service-activator input-channel="requests" ref="remote" method="execute" />

	<step id="remote" xmlns="http://www.springframework.org/schema/batch">
		<tasklet ref="tasklet" />
	</step>

	<bean id="tasklet" class="org.springframework.batch.integration.step.TestTasklet" />

</beans>