Package org.springframework.batch.core

Examples of org.springframework.batch.core.JobExecution.incrementVersion()


  @Transactional @Test
  public void testUpdateInvalidJobExecution() {

    // id is invalid
    JobExecution execution = new JobExecution(jobInstance, (long) 29432, jobParameters, null);
    execution.incrementVersion();
    try {
      jobExecutionDao.updateJobExecution(execution);
      fail("Expected NoSuchBatchDomainObjectException");
    }
    catch (NoSuchObjectException ex) {
View Full Code Here


    dao.saveJobExecution(exec1);

    JobExecution exec2 = new JobExecution(jobInstance, jobParameters);
    exec2.setId(exec1.getId());

    exec2.incrementVersion();
    assertEquals((Integer) 0, exec1.getVersion());
    assertEquals(exec1.getVersion(), exec2.getVersion());

    dao.updateJobExecution(exec1);
    assertEquals((Integer) 1, exec1.getVersion());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.