IN PROGRESS - issue BATCH-159: JobExecutor should return a JobExecution (which itself contains the ExitStatus)

http://opensource.atlassian.com/projects/spring/browse/BATCH-159

Rollback previous change...
This commit is contained in:
dsyer
2007-10-23 13:05:47 +00:00
parent 045e476ab5
commit e41d046165
2 changed files with 6 additions and 3 deletions

View File

@@ -59,8 +59,7 @@ public class SimpleJobExecutorFacade implements JobExecutorFacade,
private JobRepository jobRepository;
// Package access for unit testing...
Map jobExecutionRegistry = new HashMap();
private Map jobExecutionRegistry = new HashMap();
// there is no sensible default for this
private JobConfigurationLocator jobConfigurationLocator;

View File

@@ -16,6 +16,7 @@
package org.springframework.batch.execution.facade;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -35,6 +36,7 @@ import org.springframework.batch.core.runtime.SimpleJobIdentifier;
import org.springframework.batch.io.exception.BatchCriticalException;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.util.ReflectionUtils;
/**
* SimpleBatchContainer unit tests.
@@ -246,7 +248,9 @@ public class SimpleJobExecutorFacadeTests extends TestCase {
private void registerExecution(SimpleJobIdentifier runtimeInformation,
JobExecution execution) throws NoSuchFieldException,
IllegalAccessException {
Map map = (Map) jobExecutorFacade.jobExecutionRegistry;
Field field = SimpleJobExecutorFacade.class.getDeclaredField("jobExecutionRegistry");
ReflectionUtils.makeAccessible(field);
Map map = (Map) field.get(jobExecutorFacade);
map.put(runtimeInformation, execution);
}