BATCH-1295:

*Provide ability to pass job's ExecutionContext into AbstractJobTests.launchStep() and StepRunner.launchStep()
 *Modified SimpleMethodInvoker.hashCode() so that it is not dependent on commons-lang
This commit is contained in:
dhgarrette
2009-06-21 15:55:22 +00:00
parent 1a92c5479a
commit 026bb0665e
9 changed files with 204 additions and 79 deletions

View File

@@ -1,26 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:batch="http://www.springframework.org/schema/batch"
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.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd">
<bean id="step1" parent="taskletStep">
<property name="tasklet">
<bean class="org.springframework.batch.test.sample.SampleTasklet">
<constructor-arg value="1" />
</bean>
</property>
<batch:step id="s1" parent="taskletStep">
<batch:tasklet ref="tasklet1">
<batch:listeners>
<batch:listener ref="tasklet1"/>
</batch:listeners>
</batch:tasklet>
</batch:step>
<bean id="tasklet1" class="org.springframework.batch.test.sample.SampleTasklet">
<constructor-arg value="1" />
</bean>
<bean id="step2" parent="taskletStep">
<property name="tasklet">
<bean class="org.springframework.batch.test.sample.SampleTasklet">
<constructor-arg value="2" />
</bean>
</property>
<batch:step id="s2" parent="taskletStep">
<batch:tasklet ref="tasklet2">
<batch:listeners>
<batch:listener ref="tasklet2"/>
</batch:listeners>
</batch:tasklet>
</batch:step>
<bean id="tasklet2" class="org.springframework.batch.test.sample.SampleTasklet">
<constructor-arg value="2" />
</bean>
</beans>

View File

@@ -12,25 +12,11 @@
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<beans:import resource="sample-steps.xml" />
<job id="sampleFlowJob">
<step id="step1" parent="s1" next="step2"/>
<step id="step2" parent="s2"/>
</job>
<beans:bean id="s1" parent="taskletStep">
<beans:property name="tasklet">
<beans:bean class="org.springframework.batch.test.sample.SampleTasklet">
<beans:constructor-arg value="1" />
</beans:bean>
</beans:property>
</beans:bean>
<beans:bean id="s2" parent="taskletStep">
<beans:property name="tasklet">
<beans:bean class="org.springframework.batch.test.sample.SampleTasklet">
<beans:constructor-arg value="2" />
</beans:bean>
</beans:property>
</beans:bean>
</beans:beans>

View File

@@ -12,8 +12,8 @@
<bean id="sampleJob" parent="simpleJob">
<property name="steps">
<list>
<ref bean="step1" />
<ref bean="step2" />
<bean id="step1" parent="s1"/>
<bean id="step2" parent="s2"/>
</list>
</property>
</bean>