RESOLVED - issue BATCH-1280: JobParserJobFactoryBean should be a singleton
http://jira.springframework.org/browse/BATCH-1280
This commit is contained in:
@@ -107,7 +107,7 @@ class JobParserJobFactoryBean implements FactoryBean {
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// =========================================================
|
||||
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean, Initia
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setDelegate(Object delegate) {
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user