BATCH-220: Half way to rename StepHandler -> Tasklet

This commit is contained in:
dsyer
2008-08-28 10:38:26 +00:00
parent 223a58da18
commit ad5b0010dd
38 changed files with 200 additions and 110 deletions

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.integration.job;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.step.handler.StepHandler;
import org.springframework.batch.core.step.tasklet.StepHandler;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.core.AttributeAccessor;

View File

@@ -1,47 +1,47 @@
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<import resource="classpath:/simple-job-launcher-context.xml" />
<integration:annotation-driven/>
<integration:message-bus auto-create-channels="true" />
<integration:channel id="requests" />
<integration:channel id="replies" />
<bean id="job" parent="simpleJob">
<property name="steps">
<bean
class="org.springframework.batch.integration.job.MessageOrientedStep">
<property name="name" value="TODO: I shouldn't have to set this"/>
<property name="target" ref="requests" />
<property name="source" ref="replies" />
<property name="jobRepository" ref="jobRepository" />
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
</bean>
<bean id="step"
class="org.springframework.batch.integration.job.StepExecutionMessageHandler">
<property name="step">
<bean parent="taskletStep">
<property name="tasklet">
<bean
class="org.springframework.batch.integration.job.TestTasklet" />
</property>
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
</bean>
<integration:service-activator ref="step" method="handle" input-channel="requests"
output-channel="replies" />
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<import resource="classpath:/simple-job-launcher-context.xml" />
<integration:annotation-driven/>
<integration:message-bus auto-create-channels="true" />
<integration:channel id="requests" />
<integration:channel id="replies" />
<bean id="job" parent="simpleJob">
<property name="steps">
<bean
class="org.springframework.batch.integration.job.MessageOrientedStep">
<property name="name" value="TODO: I shouldn't have to set this"/>
<property name="target" ref="requests" />
<property name="source" ref="replies" />
<property name="jobRepository" ref="jobRepository" />
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
</bean>
<bean id="step"
class="org.springframework.batch.integration.job.StepExecutionMessageHandler">
<property name="step">
<bean parent="taskletStep">
<property name="tasklet">
<bean
class="org.springframework.batch.integration.job.TestTasklet" />
</property>
</bean>
</property>
<property name="jobRepository" ref="jobRepository" />
</bean>
<integration:service-activator ref="step" method="handle" input-channel="requests"
output-channel="replies" />
</beans>

View File

@@ -26,8 +26,8 @@
<property name="jobRepository" ref="jobRepository" />
<property name="restartable" value="true" />
</bean>
<bean id="handlerStep"
class="org.springframework.batch.core.step.handler.StepHandlerStep"
<bean id="taskletStep"
class="org.springframework.batch.core.step.tasklet.StepHandlerStep"
abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="jobRepository" ref="jobRepository" />