@Test public void testCreateTwoWithRollbackInEJBCall() throws Exception { String first = "first"; String second = "second"; assertFalse(queriesEJB.isInDB(first)); assertFalse(queriesEJB.isInDB(second)); ejb.createTwoWithRollbackInEJBCall(first, second); assertFalse(queriesEJB.isInDB(first)); assertTrue(queriesEJB.isInDB(second)); }
public void createTwoWithRollbackInEJBCall(String first, String second){ createFooRequired(first); EJB_05_REQUIRES_NEW ejb = ctx.getBusinessObject(EJB_05_REQUIRES_NEW.class); ejb.createFooRequiresNew(second); ctx.setRollbackOnly(); }
EJB_05_REQUIRES_NEW { public void createTwoWithRollbackInEJBCall(String first, String second){ createFooRequired(first); EJB_05_REQUIRES_NEW ejb = ctx.getBusinessObject(EJB_05_REQUIRES_NEW.class); ejb.createFooRequiresNew(second); ctx.setRollbackOnly(); } }
EJB_05_REQUIRES_NEW { public void createTwoWithRollbackInEJBCall(String first, String second){ createFooRequired(first); EJB_05_REQUIRES_NEW ejb = ctx.getBusinessObject(EJB_05_REQUIRES_NEW.class); ejb.createFooRequiresNew(second); ctx.setRollbackOnly(); }  }
EJB_05_REQUIRES_NEW { public void createTwoWithRollbackInEJBCall(String first, String second){ createFooRequired(first); EJB_05_REQUIRES_NEW ejb = ctx.getBusinessObject(EJB_05_REQUIRES_NEW.class); ejb.createFooRequiresNew(second); ctx.setRollbackOnly(); }  void createFooRequired(String name); @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) void createFooRequiresNew(String name); void createTwoWithRollback(String first, String second); void createTwoWithRollbackInEJBCall(String first, String second); void createTwoWithRollbackInEJBCallOnSameTransaction(String first, String second); }
EJB_05_REQUIRES_NEW { public void createTwoWithRollbackInEJBCall(String first, String second){ createFooRequired(first); EJB_05_REQUIRES_NEW ejb = ctx.getBusinessObject(EJB_05_REQUIRES_NEW.class); ejb.createFooRequiresNew(second); ctx.setRollbackOnly(); }  void createFooRequired(String name); @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) void createFooRequiresNew(String name); void createTwoWithRollback(String first, String second); void createTwoWithRollbackInEJBCall(String first, String second); void createTwoWithRollbackInEJBCallOnSameTransaction(String first, String second);  }