Package org.springframework.batch.support.transaction

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


    JobSupport job = new JobSupport();
    job.addStep(step);
    job.setBeanName("testJob");
    jobExecution = jobRepository.createJobExecution(job.getName(), new JobParameters());
    step.setJobRepository(jobRepository);
    step.setTransactionManager(new ResourcelessTransactionManager());
    itemWriter = new ItemWriter<Object>() {
      @Override
      public void write(List<? extends Object> item) throws Exception {
      }
    };
View Full Code Here


  /**
   * Create a new instance with a {@link ResourcelessTransactionManager}.
   */
  public MapJobRepositoryFactoryBean() {
    this(new ResourcelessTransactionManager());
  }
View Full Code Here

    writer = new SkipWriterStub<String>();

    factory = new FaultTolerantStepFactoryBean<String, String>();

    factory.setBeanName("stepName");
    ResourcelessTransactionManager transactionManager = new ResourcelessTransactionManager();
    factory.setTransactionManager(transactionManager);
    factory.setCommitInterval(2);

    reader.clear();
    reader.setItems("1", "2", "3", "4", "5");
View Full Code Here

  @Before
  public void setUp() throws Exception {
    factory = new FaultTolerantStepFactoryBean<String, String>();

    factory.setBeanName("stepName");
    factory.setTransactionManager(new ResourcelessTransactionManager());
    factory.setCommitInterval(2);

    reader.clear();
    reader.setItems("1", "2", "3", "4", "5");
    factory.setItemReader(reader);
View Full Code Here

    builder = new JsrFaultTolerantStepBuilder<String, String>(new StepBuilder("step1"));
    builder.setBatchPropertyContext(new BatchPropertyContext());
    repository = new MapJobRepositoryFactoryBean().getObject();
    builder.repository(repository);
    builder.transactionManager(new ResourcelessTransactionManager());
    stepExecution = null;
  }
View Full Code Here

  @Test
  public void testWrite() throws Exception {
    StopWatch stopWatch = new StopWatch(getClass().getSimpleName());
    stopWatch.start();
    for (int i = 0; i < MAX_WRITE; i++) {
      new TransactionTemplate(new ResourcelessTransactionManager()).execute(new TransactionCallback<Void>() {
        @Override
        public Void doInTransaction(TransactionStatus status) {
          try {
            writer.write(objects);
          }
View Full Code Here

        writer.write("f");
      }
    });
    super.setUp(delegate);
   
    ResourcelessTransactionManager transactionManager = new ResourcelessTransactionManager();
   
    new TransactionTemplate(transactionManager).execute(new WriterCallback(Arrays.asList("1", "2", "3")));

    File part1 = new File(file.getAbsolutePath() + suffixCreator.getSuffix(1));
    assertTrue(part1.exists());
View Full Code Here

        writer.write("f");
      }
    });
    super.setUp(delegate);

    ResourcelessTransactionManager transactionManager = new ResourcelessTransactionManager();
   
    new TransactionTemplate(transactionManager).execute(new WriterCallback(Arrays.asList("1", "2", "3")));

    File part1 = new File(file.getAbsolutePath() + suffixCreator.getSuffix(1));
    assertTrue(part1.exists());
View Full Code Here

      return this.jobRepository;
    }

    @Override
    public PlatformTransactionManager getTransactionManager() throws Exception {
      return new ResourcelessTransactionManager();
    }
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.