stateTransitions.addAll(stepParser.parse(child, parserContext, builder)); } else if(nodeName.equals(SPLIT_ELE)) { stateTransitions.addAll(new JsrSplitParser(flowName).parse(child, parserContext)); } else if(nodeName.equals(DECISION_ELE)) { stateTransitions.addAll(new JsrDecisionParser().parse(child, parserContext, flowName));
@Test public void testUserSpecifiedTaskExecutor() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/org/springframework/batch/core/jsr/configuration/xml/user-specified-split-task-executor-context.xml"); BeanDefinitionRegistry registry = (BeanDefinitionRegistry) context.getBeanFactory(); PropertyValue propertyValue = new JsrSplitParser(null).getSplitTaskExecutorPropertyValue(registry); RuntimeBeanReference runtimeBeanReferenceValue = (RuntimeBeanReference) propertyValue.getValue(); Assert.assertTrue("RuntimeBeanReference should have a name of jsr352splitTaskExecutor" , "jsr352splitTaskExecutor".equals(runtimeBeanReferenceValue.getBeanName())); context.close(); }
@Test public void testDefaultTaskExecutor() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/org/springframework/batch/core/jsr/configuration/xml/default-split-task-executor-context.xml"); BeanDefinitionRegistry registry = (BeanDefinitionRegistry) context.getBeanFactory(); PropertyValue propertyValue = new JsrSplitParser(null).getSplitTaskExecutorPropertyValue(registry); Assert.assertTrue("Task executor not an instance of SimpleAsyncTaskExecutor" , (propertyValue.getValue() instanceof SimpleAsyncTaskExecutor)); context.close(); }
stateTransitions.addAll(stepParser.parse(child, parserContext, builder)); } else if(nodeName.equals(SPLIT_ELE)) { stateTransitions.addAll(new JsrSplitParser(flowName).parse(child, parserContext)); } else if(nodeName.equals(DECISION_ELE)) { stateTransitions.addAll(new JsrDecisionParser().parse(child, parserContext, flowName));
stateTransitions.addAll(stepParser.parse(child, parserContext, builder)); } else if(nodeName.equals(SPLIT_ELE)) { stateTransitions.addAll(new JsrSplitParser(flowName).parse(child, parserContext)); } else if(nodeName.equals(DECISION_ELE)) { stateTransitions.addAll(new JsrDecisionParser().parse(child, parserContext, flowName));
stateTransitions.addAll(stepParser.parse(child, parserContext, builder)); } else if(nodeName.equals(SPLIT_ELE)) { stateTransitions.addAll(new JsrSplitParser(flowName).parse(child, parserContext)); } else if(nodeName.equals(DECISION_ELE)) { stateTransitions.addAll(new JsrDecisionParser().parse(child, parserContext, flowName));