|
Description:
|
If any exception occurs while saving a contact (like ConstraintViolationException), an exception is thrown from ContactController.getAllContacts and an error page appears.
This happens, because the contactsCRUD.jsf continues rendering after the exception (EJBException(PersistenceException)) in save(), and when the JSF calls ContactController.getAllContacts, the underlying EJB ContactRepository no longer exists, as it is destroyed (as per EJB 3.1, 14.3.1) after the system exception happens in ContactRepository.persist.
|