Package org.springframework.issues.data

Examples of org.springframework.issues.data.Book


  @Autowired
  private BookService books;
 
  @Test
  public void test() throws InterruptedException {
    final Book book1 = new Book(1, "A");
    books.createBook(book1);
    final Book book2 = new Book(2, "B");
    books.createBook(book2);

    final Book book3 = new Book(3, "C");
    books.createBookWithoutTx(book3);
   
    final Book bookAfterCommit = new Book(55, "AFTER COMMIT");
    books.triggerCreatePostCommit(bookAfterCommit);
    final Book book4 = new Book(4, "D");
    books.createBook(book4);
   
    assertEquals(book1, books.lookupBookById(1));
    assertEquals(book2, books.lookupBookById(2));
   
View Full Code Here


  }

  @Override
  @Transactional(propagation = Propagation.NEVER)
  public void createBookWithoutTx(Book book) {
    Book lookup = books.lookup(book.getId());
    if (lookup != null) {
      throw new IllegalArgumentException("Entity already exists " + book);
    }
    booksInternal.createAnotherBook(book);
  }
View Full Code Here

TOP

Related Classes of org.springframework.issues.data.Book

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.