update docs for release

This commit is contained in:
David Syer
2010-05-17 13:27:25 +00:00
committed by Michael Minella
parent 81c3b7db88
commit feafd1d4aa
2 changed files with 89 additions and 110 deletions

View File

@@ -1,101 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p" xmlns:integration="http://www.springframework.org/schema/integration"
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://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<import resource="classpath:/simple-job-launcher-context.xml" />
<integration:channel id="requests">
<integration:queue />
</integration:channel>
<integration:channel id="staging">
<integration:queue />
</integration:channel>
<integration:channel id="replies">
<integration:queue />
</integration:channel>
<integration:service-activator ref="stepExecutionRequestHandler"
input-channel="requests" output-channel="staging">
<integration:poller>
<integration:interval-trigger interval="10" />
</integration:poller>
</integration:service-activator>
<integration:aggregator ref="partitionHandler"
timeout="10000" input-channel="staging" output-channel="replies">
<integration:poller>
<integration:interval-trigger interval="10" />
</integration:poller>
</integration:aggregator>
<!-- This is the "remote" worker (which in this case is local) -->
<bean id="stepExecutionRequestHandler"
class="org.springframework.batch.integration.partition.StepExecutionRequestHandler"
p:jobExplorer-ref="jobExplorer" p:stepLocator-ref="stepLocator" />
<bean id="stepLocator"
class="org.springframework.batch.integration.partition.BeanFactoryStepLocator" />
<bean id="jobExplorer"
class="org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean">
<property name="repositoryFactory" ref="&amp;jobRepository"/>
</bean>
<bean id="partitionHandler"
class="org.springframework.batch.integration.partition.MessageChannelPartitionHandler">
<property name="messagingGateway">
<bean
class="org.springframework.integration.gateway.SimpleMessagingGateway">
<property name="requestChannel" ref="requests" />
<property name="replyChannel" ref="replies" />
<property name="replyTimeout" value="10000" />
</bean>
</property>
<property name="stepName" value="step1" />
<property name="gridSize" value="2" />
</bean>
<bean id="job1" parent="simpleJob">
<property name="steps">
<bean name="step1:master"
class="org.springframework.batch.core.partition.support.PartitionStep">
<property name="partitionHandler" ref="partitionHandler" />
<property name="stepExecutionSplitter">
<bean
class="org.springframework.batch.core.partition.support.SimpleStepExecutionSplitter">
<property name="jobRepository" ref="jobRepository" />
<property name="stepName" value="step1" />
<property name="partitioner">
<bean class="org.springframework.batch.core.partition.support.SimplePartitioner"/>
</property>
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
</bean>
</property>
</bean>
<bean id="step1" parent="simpleStep">
<property name="itemReader">
<bean
class="org.springframework.batch.integration.partition.ExampleItemReader"
scope="step">
<!--
<property name="resource"
value="#{stepAttributes[jobParameters['resource']]}"/>
-->
</bean>
</property>
<property name="itemWriter">
<bean
class="org.springframework.batch.integration.partition.ExampleItemWriter" />
</property>
</bean>
<bean class="org.springframework.batch.core.scope.StepScope" />
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p"
xmlns:integration="http://www.springframework.org/schema/integration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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.xsd">
<import resource="classpath:/simple-job-launcher-context.xml" />
<channel id="requests" xmlns="http://www.springframework.org/schema/integration">
<queue />
</channel>
<channel id="staging" xmlns="http://www.springframework.org/schema/integration">
<queue />
</channel>
<channel id="replies" xmlns="http://www.springframework.org/schema/integration">
<queue />
</channel>
<service-activator ref="stepExecutionRequestHandler" input-channel="requests" output-channel="staging"
xmlns="http://www.springframework.org/schema/integration">
<poller>
<interval-trigger interval="10" />
</poller>
</service-activator>
<aggregator ref="partitionHandler" timeout="10000" input-channel="staging" output-channel="replies"
xmlns="http://www.springframework.org/schema/integration">
<poller>
<interval-trigger interval="10" />
</poller>
</aggregator>
<!-- This is the "remote" worker (which in this case is local) -->
<bean id="stepExecutionRequestHandler" class="org.springframework.batch.integration.partition.StepExecutionRequestHandler"
p:jobExplorer-ref="jobExplorer" p:stepLocator-ref="stepLocator" />
<bean id="stepLocator" class="org.springframework.batch.integration.partition.BeanFactoryStepLocator" />
<bean id="jobExplorer" class="org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean">
<property name="repositoryFactory" ref="&amp;jobRepository" />
</bean>
<bean id="partitionHandler" class="org.springframework.batch.integration.partition.MessageChannelPartitionHandler">
<property name="messagingGateway">
<bean class="org.springframework.integration.gateway.SimpleMessagingGateway">
<property name="requestChannel" ref="requests" />
<property name="replyChannel" ref="replies" />
<property name="replyTimeout" value="10000" />
</bean>
</property>
<property name="stepName" value="step1" />
<property name="gridSize" value="2" />
</bean>
<job id="job1" xmlns="http://www.springframework.org/schema/batch">
<step id="step1-master">
<partition handler="partitionHandler" partitioner="partitioner" step="step1" />
</step>
</job>
<bean id="partitioner" class="org.springframework.batch.core.partition.support.SimplePartitioner" />
<step id="step1" xmlns="http://www.springframework.org/schema/batch">
<tasklet>
<chunk commit-interval="10">
<reader>
<bean class="org.springframework.batch.integration.partition.ExampleItemReader" scope="step"
xmlns="http://www.springframework.org/schema/beans" />
</reader>
<writer>
<bean class="org.springframework.batch.integration.partition.ExampleItemWriter" xmlns="http://www.springframework.org/schema/beans" />
</writer>
</chunk>
</tasklet>
</step>
</beans>