353637383940414243444546
@Inject private Request request; void onPersistEntity() { final User user = new User(); user.setFirstName("name"); userDAO.add(user); this.user = user; }
50515253545556
user = null; } void onSetToTransient() { user = new User(); }
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); }