@Test public void testAddAndThrowExceptionWithRollback() throws Exception { String name = "Bar"; assertFalse(queriesEJB.isInDB(name)); try { ejb.addAndThrowExceptionWithRollback(name); fail(); } catch (Exception e){ } assertFalse(queriesEJB.isInDB(name)); }
public void addAndThrowExceptionWithRollback(String name) throws Exception { Foo foo = new Foo(name); em.persist(foo); throw new WithRollbackException("Rollback"); }
EJB_11_exceptions { public void addAndThrowExceptionWithRollback(String name) throws Exception { Foo foo = new Foo(name); em.persist(foo); throw new WithRollbackException("Rollback"); } }
EJB_11_exceptions { public void addAndThrowExceptionWithRollback(String name) throws Exception { Foo foo = new Foo(name); em.persist(foo); throw new WithRollbackException("Rollback"); }  }
EJB_11_exceptions { public void addAndThrowExceptionWithRollback(String name) throws Exception { Foo foo = new Foo(name); em.persist(foo); throw new WithRollbackException("Rollback"); }  void addAndThrowRuntimeException(String name); void addAndThrowException(String name); void addAndThrowRuntimeExceptionNoRollback(String name); void addAndThrowExceptionWithRollback(String name); }
EJB_11_exceptions { public void addAndThrowExceptionWithRollback(String name) throws Exception { Foo foo = new Foo(name); em.persist(foo); throw new WithRollbackException("Rollback"); }  void addAndThrowRuntimeException(String name); void addAndThrowException(String name); void addAndThrowRuntimeExceptionNoRollback(String name); void addAndThrowExceptionWithRollback(String name);  }