BATCH-2253: Added automatic registraiton of Job Scope to java config and

added support for a @JobScope annotation.
This commit is contained in:
Michael Minella
2014-06-12 16:42:48 -05:00
parent 752fe55e88
commit 8f8600c14d
8 changed files with 371 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd">
<bean class="org.springframework.batch.core.scope.JobScope">
<property name="proxyTargetClass" value="true" />
</bean>
<bean id="parent" class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" scope="job" abstract="true">
<constructor-arg value="#{jobName}" />
</bean>
<bean id="child" class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" parent="parent"/>
</beans>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd">
<bean class="org.springframework.batch.core.scope.JobScope" />
<bean class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleCallable"
scope="job">
<constructor-arg value="#{jobName}" />
</bean>
</beans>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd">
<bean class="org.springframework.batch.core.scope.JobScope">
<property name="proxyTargetClass" value="true" />
</bean>
<bean class="org.springframework.batch.core.configuration.annotation.JobScopeConfigurationTests$SimpleHolder" scope="job">
<constructor-arg value="#{jobName}" />
</bean>
</beans>