RESOLVED - issue BATCH-1280: JobParserJobFactoryBean should be a singleton

http://jira.springframework.org/browse/BATCH-1280
This commit is contained in:
dsyer
2009-06-05 10:17:57 +00:00
parent 7ef1e58867
commit 9a7bdaa775
4 changed files with 20 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ class JobParserJobFactoryBean implements FactoryBean {
}
public boolean isSingleton() {
return false;
return true;
}
}

View File

@@ -369,7 +369,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
}
public boolean isSingleton() {
return false;
return true;
}
// =========================================================

View File

@@ -142,7 +142,7 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean, Initia
}
public boolean isSingleton() {
return false;
return true;
}
public void setDelegate(Object delegate) {

View File

@@ -0,0 +1,17 @@
package org.springframework.batch.core.configuration.xml;
import static org.junit.Assert.*;
import org.junit.Test;
public class JobParserJobFactoryBeanTests {
private JobParserJobFactoryBean factory = new JobParserJobFactoryBean("jobFactory");
@Test
public void testSingleton() throws Exception {
assertTrue("Expected singleton", factory.isSingleton());
}
}