@TransactionAttribute(TransactionAttributeType.REQUIRED) public void case3(Product p1, Product p2) { em.persist(p1); try { productDao.throwExceptionInNewTransaction(p2); } catch (Exception e) { } }
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) public void case8(Product p1, Product p2) { productDao.persist(p1, p2); }
@TransactionAttribute(TransactionAttributeType.NEVER) public void case7(Product p1, Product p2) { productDao.persist(p1, p2); }
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void case6(Product p1, Product p2) { productDao.case6_(p2); em.persist(p1); throw new RuntimeException(); }
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void case5(Product p1, Product p2) { em.persist(p1); productDao.throwExceptionInNewTransactionButCatch(p2); }
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void case2(Product p1, Product p2) { em.persist(p1); productDao.case2_(p2); }