Package org.springframework.batch.support.transaction

Examples of org.springframework.batch.support.transaction.ResourcelessTransactionManager


    final List<String> ITEM_LIST =  TransactionAwareProxyFactory.createTransactionalList(Arrays.asList("1", "2", "3"));
    FaultTolerantStepFactoryBean<String, Integer> factory = new FaultTolerantStepFactoryBean<String, Integer>();
    factory.setBeanName("step");

    factory.setJobRepository(repository);
    factory.setTransactionManager(new ResourcelessTransactionManager());
    ItemWriter<Integer> failingWriter = new ItemWriter<Integer>() {
      @Override
      public void write(List<? extends Integer> data) throws Exception {
        int count = 0;
        for (Integer item : data) {
View Full Code Here


    reader = new ListItemReader<String>(items);

    factory.setItemReader(reader);
    factory.setItemWriter(writer);
    factory.setJobRepository(repository);
    factory.setTransactionManager(new ResourcelessTransactionManager());
    factory.setBeanName("stepName");
    return factory;
  }
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");
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);
View Full Code Here

    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);
    fb.setTransactionTimeout(-1);
    fb.setPropagation(Propagation.REQUIRED);
    Object step = fb.getObject();
View Full Code Here

  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);
    Object tasklet = ReflectionTestUtils.getField(step, "tasklet");
    assertTrue(tasklet instanceof DummyTasklet);
View Full Code Here

    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);
    fb.setPropagation(Propagation.REQUIRED);
    fb.setChunkCompletionPolicy(new DummyCompletionPolicy());
View Full Code Here

    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);
    fb.setPropagation(Propagation.REQUIRED);
    fb.setChunkCompletionPolicy(new DummyCompletionPolicy());
View Full Code Here

    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);
    fb.setPropagation(Propagation.REQUIRED);
    fb.setChunkCompletionPolicy(new DummyCompletionPolicy());
View Full Code Here

    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());
    fb.setItemReader(new DummyItemReader());
    fb.setItemProcessor(new PassThroughItemProcessor<Object>());
View Full Code Here

TOP

Related Classes of org.springframework.batch.support.transaction.ResourcelessTransactionManager

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.