diff --git a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/BatchCommandLineLauncher.java b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/BatchCommandLineLauncher.java index 50642da19..e9d7aaeb8 100644 --- a/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/BatchCommandLineLauncher.java +++ b/execution/src/main/java/org/springframework/batch/execution/bootstrap/support/BatchCommandLineLauncher.java @@ -100,10 +100,15 @@ public class BatchCommandLineLauncher { * The default path to the job configuration. */ public static final String DEFAULT_JOB_CONFIGURATION_PATH = "job-configuration.xml"; + /** + * The default path to the bean reference context. + */ + public static final String DEFAULT_BEAN_REF_CONTEXT_PATH = "beanRefContext.xml"; private static final String JOB_CONFIGURATION_PATH_KEY = "job.configuration.path"; private static final String JOB_NAME_KEY = "job.name"; private static final String BATCH_EXECUTION_ENVIRONMENT_KEY = "batch.execution.environment.key"; + private static final String BEAN_REF_CONTEXT_KEY = "bean.ref.context"; private BeanFactoryLocator beanFactoryLocator; @@ -115,8 +120,9 @@ public class BatchCommandLineLauncher { private SystemExiter systemExiter = new JvmSystemExiter(); - public BatchCommandLineLauncher() { - beanFactoryLocator = ContextSingletonBeanFactoryLocator.getInstance(); + public BatchCommandLineLauncher(String beanRefContextPath) { + beanFactoryLocator = ContextSingletonBeanFactoryLocator + .getInstance(beanRefContextPath); } /** @@ -250,6 +256,8 @@ public class BatchCommandLineLauncher { * {@link JobLauncher} *