2526272829303132
void onActivate() { if (user == null) { user = new User(); } }
28293031323334353637383940
@Inject private UserDAO userDAO; Object onActionFromCommitAfter() { final User user = new User(); user.setFirstName("Diane"); userDAO.add(user); commitAfterDemo.setUser(user);
40414243444546474849
@CommitAfter @PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT) void onCreate() { final User user = new User(); user.setFirstName("name"); entityManager.persist(user); }