OPEN - issue BATCH-404: FactoryBeans for step configuration

http://jira.springframework.org/browse/BATCH-404

Remove SimpleStepFactoryBean.
This commit is contained in:
dsyer
2008-03-03 16:16:59 +00:00
parent 760b0405fb
commit 196b8547b8
16 changed files with 66 additions and 127 deletions

View File

@@ -9,7 +9,7 @@
<import resource="data-source-context-init.xml" />
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${batch.jdbc.driver}" />
<property name="url" value="${batch.jdbc.url}" />
<property name="username" value="${batch.jdbc.user}" />

View File

@@ -15,7 +15,7 @@
<!-- set restartable=false so that this job can be used by more than one test -->
<property name="restartable" value="false" />
<property name="steps">
<bean id="step1" parent="defaultStep">
<bean id="step1" parent="simpleStep">
<property name="alwaysSkip" value="true" />
<property name="itemReader" ref="hibernateItemReader" />
<property name="itemWriter" ref="hibernateOutputSource" />

View File

@@ -4,19 +4,19 @@
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">
<bean id="parallelJob" parent="simpleJob">
<property name="steps">
<list>
<bean id="staging" parent="defaultStep">
<property name="commitInterval" value="2" />
<property name="startLimit" value="100" />
<property name="streams" ref="fileInputTemplate" />
<property name="itemReader">
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">
<bean id="parallelJob" parent="simpleJob">
<property name="steps">
<list>
<bean id="staging" parent="simpleStep">
<property name="commitInterval" value="2" />
<property name="startLimit" value="100" />
<property name="streams" ref="fileInputTemplate" />
<property name="itemReader">
<bean
class="org.springframework.batch.item.reader.ValidatingItemReader">
<property name="itemReader"
@@ -41,7 +41,7 @@
</bean>
</property>
</bean>
<bean id="loading" parent="defaultStep">
<bean id="loading" parent="simpleStep">
<property name="taskExecutor">
<bean
class="org.springframework.core.task.SimpleAsyncTaskExecutor" />

View File

@@ -11,7 +11,7 @@
<bean id="retrySample" parent="simpleJob">
<property name="steps">
<bean id="step1" parent="defaultStep"
<bean id="step1" parent="simpleStep"
class="org.springframework.batch.execution.step.support.StatefulRetryStepFactoryBean">
<property name="itemReader" ref="itemGenerator" />
<property name="itemWriter" ref="itemWriter" />

View File

@@ -14,7 +14,7 @@
<bean id="tradeJob" parent="simpleJob">
<property name="steps">
<list>
<bean id="step1" parent="defaultStep">
<bean id="step1" parent="simpleStep">
<property name="alwaysSkip" value="true" />
<property name="streams" ref="fileInputTemplate" />
<property name="itemReader">

View File

@@ -23,12 +23,12 @@ log4j.rootLogger=info, stdout
### enable spring
log4j.logger.org.springframework=error
log4j.logger.org.springframework.batch.sample=debug
#log4j.logger.org.springframework.transaction=debug
#log4j.logger.org.springframework.jdbc.core=debug
#log4j.logger.org.springframework.orm=debug
### debug your specific package or classes with the following example
log4j.logger.org.springframework.batch=debug
#log4j.logger.org.springframework.batch=debug
log4j.logger.org.springframework.batch.sample=debug
log4j.logger.org.springframework.batch.sample.module.OrderDataProvider=debug
log4j.logger.org.springframework.batch.container.common.module.process.support.DefaultXmlDataProvider=debug

View File

@@ -95,7 +95,7 @@
</bean>
<bean id="simpleStep"
class="org.springframework.batch.execution.step.support.SimpleStepFactoryBean"
class="org.springframework.batch.execution.step.support.DefaultStepFactoryBean"
abstract="true">
<property name="transactionManager" ref="transactionManager" />
<property name="jobRepository" ref="jobRepository" />
@@ -103,10 +103,6 @@
<property name="commitInterval" value="1" />
</bean>
<bean id="defaultStep" parent="simpleStep"
class="org.springframework.batch.execution.step.support.DefaultStepFactoryBean"
abstract="true" />
<bean id="customEditorConfigurer"
class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">