Package com.avaje.tests.model.basic.xtra

Examples of com.avaje.tests.model.basic.xtra.OptimisticLockExceptionThrowingDao


    v.setName("occ");
    v.setDescription("blah");
    Ebean.save(v);

    logger.info("-- OptimisticLockExceptionThrowingDao");
    OptimisticLockExceptionThrowingDao dao = new OptimisticLockExceptionThrowingDao();
    try {
      dao.doSomething(v);
      // never get here
      Assert.assertTrue(false);
    } catch (OptimisticLockException e) {
      Transaction inMethodTransaction = dao.getInMethodTransaction();
      boolean active = inMethodTransaction.isActive();
      Assert.assertFalse(active);
    }
  }
View Full Code Here

TOP

Related Classes of com.avaje.tests.model.basic.xtra.OptimisticLockExceptionThrowingDao

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.