@Test public void testFailWrite(){ String name = "foo"; assertFalse(queriesEJB.isInDB(name)); try { ejb.createFooWithSupports(name); fail(); } catch (EJBException e){ } }
@TransactionAttribute(TransactionAttributeType.SUPPORTS) public void createFooWithSupports(String name){ Foo foo = new Foo(name); em.persist(foo); }
EJB_04_SUPPORTS { @TransactionAttribute(TransactionAttributeType.SUPPORTS) public void createFooWithSupports(String name){ Foo foo = new Foo(name); em.persist(foo); } }
EJB_04_SUPPORTS { @TransactionAttribute(TransactionAttributeType.SUPPORTS) public void createFooWithSupports(String name){ Foo foo = new Foo(name); em.persist(foo); }  }
EJB_04_SUPPORTS { @TransactionAttribute(TransactionAttributeType.SUPPORTS) public void createFooWithSupports(String name){ Foo foo = new Foo(name); em.persist(foo); }  @TransactionAttribute(TransactionAttributeType.REQUIRED) void createFooWithRequiredTransaction(String name); @TransactionAttribute(TransactionAttributeType.SUPPORTS) boolean isPresentWithSupports(String name); @TransactionAttribute(TransactionAttributeType.SUPPORTS) void createFooWithSupports(String name); void createTwo(String first, String second); }
EJB_04_SUPPORTS { @TransactionAttribute(TransactionAttributeType.SUPPORTS) public void createFooWithSupports(String name){ Foo foo = new Foo(name); em.persist(foo); }  @TransactionAttribute(TransactionAttributeType.REQUIRED) void createFooWithRequiredTransaction(String name); @TransactionAttribute(TransactionAttributeType.SUPPORTS) boolean isPresentWithSupports(String name); @TransactionAttribute(TransactionAttributeType.SUPPORTS) void createFooWithSupports(String name); void createTwo(String first, String second);  }