@Test public void test(){ String first = "first"; String second = "second"; assertFalse(queriesEJB.isInDB(first)); assertFalse(queriesEJB.isInDB(second)); ejb.createTwo(true,first,second); assertFalse(queriesEJB.isInDB(first)); assertFalse(queriesEJB.isInDB(second)); ejb.createTwo(false,first,second); assertTrue(queriesEJB.isInDB(first)); assertTrue(queriesEJB.isInDB(second)); }
public void createTwo(boolean rollback, String first, String second) { Foo foo = new Foo(first); Foo bar = new Foo(second); em.persist(foo); em.persist(bar); if(rollback) { ctx.setRollbackOnly(); } }
EJB_03_rollback { public void createTwo(boolean rollback, String first, String second) { Foo foo = new Foo(first); Foo bar = new Foo(second); em.persist(foo); em.persist(bar); if(rollback) { ctx.setRollbackOnly(); } } }
EJB_03_rollback { public void createTwo(boolean rollback, String first, String second) { Foo foo = new Foo(first); Foo bar = new Foo(second); em.persist(foo); em.persist(bar); if(rollback) { ctx.setRollbackOnly(); } }  }
EJB_03_rollback { public void createTwo(boolean rollback, String first, String second) { Foo foo = new Foo(first); Foo bar = new Foo(second); em.persist(foo); em.persist(bar); if(rollback) { ctx.setRollbackOnly(); } }  void createTwo(boolean rollback, String first, String second); }
EJB_03_rollback { public void createTwo(boolean rollback, String first, String second) { Foo foo = new Foo(first); Foo bar = new Foo(second); em.persist(foo); em.persist(bar); if(rollback) { ctx.setRollbackOnly(); } }  void createTwo(boolean rollback, String first, String second);  }