Package org.springframework.batch.core.step

Examples of org.springframework.batch.core.step.JobRepositorySupport


  }

  @Test
  public void testNullsInConstructor() {
    try {
      new JsrJobOperator(null, new JobRepositorySupport(), parameterConverter);
      fail("JobExplorer should be required");
    } catch (IllegalArgumentException correct) {
    }

    try {
      new JsrJobOperator(new SimpleJobExplorer(null, null, null, null), null, parameterConverter);
      fail("JobRepository should be required");
    } catch (IllegalArgumentException correct) {
    }

    try {
      new JsrJobOperator(new SimpleJobExplorer(null, null, null, null), new JobRepositorySupport(), null);
      fail("ParameterConverter should be required");
    } catch (IllegalArgumentException correct) {
    }

    new JsrJobOperator(new SimpleJobExplorer(null, null, null, null), new JobRepositorySupport(), parameterConverter);
  }
View Full Code Here


  int count = 0;

  @Before
  public void setUp() throws Exception {
    factory.setBeanName("stepName");
    factory.setJobRepository(new JobRepositorySupport());
    factory.setTransactionManager(new ResourcelessTransactionManager());
    factory.setCommitInterval(2);
    factory.setItemReader(reader);
    factory.setItemWriter(writer);
    Map<Class<? extends Throwable>, Boolean> skippableExceptions = new HashMap<Class<? extends Throwable>, Boolean>();
View Full Code Here

  @Test
  public void testOnlyTaskletSet() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setName("step");
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setJobRepository(new JobRepositorySupport());
    fb.setTasklet(new DummyTasklet());
    Object step = fb.getObject();
    assertTrue(step instanceof TaskletStep);
    Object tasklet = ReflectionTestUtils.getField(step, "tasklet");
    assertTrue(tasklet instanceof DummyTasklet);
View Full Code Here

  @Test
  public void testOnlyTaskletTaskExecutor() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setName("step");
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setJobRepository(new JobRepositorySupport());
    fb.setTasklet(new DummyTasklet());
    fb.setTaskExecutor(new SimpleAsyncTaskExecutor());
    Object step = fb.getObject();
    assertTrue(step instanceof TaskletStep);
    Object stepOperations = ReflectionTestUtils.getField(step, "stepOperations");
View Full Code Here

  @Test
  public void testTaskletStepAll() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setBeanName("step1");
    fb.setAllowStartIfComplete(true);
    fb.setJobRepository(new JobRepositorySupport());
    fb.setStartLimit(5);
    fb.setTasklet(new DummyTasklet());
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setListeners(new StepExecutionListenerSupport[] { new StepExecutionListenerSupport() });
    fb.setIsolation(Isolation.DEFAULT);
View Full Code Here

  @Test
  public void testTaskletStepMissingIsolation() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setBeanName("step1");
    fb.setJobRepository(new JobRepositorySupport());
    fb.setTasklet(new DummyTasklet());
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setPropagation(Propagation.REQUIRED);
    Object step = fb.getObject();
    assertTrue(step instanceof TaskletStep);
View Full Code Here

  @Test(expected = IllegalStateException.class)
  public void testSimpleStepAll() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setBeanName("step1");
    fb.setAllowStartIfComplete(true);
    fb.setJobRepository(new JobRepositorySupport());
    fb.setStartLimit(5);
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
    fb.setIsolation(Isolation.DEFAULT);
    fb.setTransactionTimeout(-1);
View Full Code Here

  @Test(expected = IllegalArgumentException.class)
  public void testFaultTolerantStepAll() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setBeanName("step1");
    fb.setAllowStartIfComplete(true);
    fb.setJobRepository(new JobRepositorySupport());
    fb.setStartLimit(5);
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
    fb.setIsolation(Isolation.DEFAULT);
    fb.setTransactionTimeout(-1);
View Full Code Here

  public void testSimpleStep() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setHasChunkElement(true);
    fb.setBeanName("step1");
    fb.setAllowStartIfComplete(true);
    fb.setJobRepository(new JobRepositorySupport());
    fb.setStartLimit(5);
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
    fb.setIsolation(Isolation.DEFAULT);
    fb.setTransactionTimeout(-1);
View Full Code Here

  public void testFaultTolerantStep() throws Exception {
    StepParserStepFactoryBean<Object, Object> fb = new StepParserStepFactoryBean<Object, Object>();
    fb.setHasChunkElement(true);
    fb.setBeanName("step1");
    fb.setAllowStartIfComplete(true);
    fb.setJobRepository(new JobRepositorySupport());
    fb.setStartLimit(5);
    fb.setTransactionManager(new ResourcelessTransactionManager());
    fb.setListeners(new StepListener[] { new StepExecutionListenerSupport() });
    fb.setChunkCompletionPolicy(new DummyCompletionPolicy());
    fb.setTaskExecutor(new SyncTaskExecutor());
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.step.JobRepositorySupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.