1 Reply Latest reply on Jun 5, 2009 11:24 PM by Jean Luc

    Supress Exceptions Logging

    Israel Fonseca Apprentice

      I dont know if this is a Seam question, or an EJB question or even a JBoss-AS question but..


      How can i supress the exception messages in the server console (Jboss 4.2.3) from runtimeExceptions throw by an EJB. Example:


      -- Stateless EJB


      persist(user); // Error user with same ID in the database.


      -- View
      try{
      userBO.persist(user)
      } catch (Exception e){
      FacesMessage.instance().add(Same user);
      }


      What can i do? Should the right practice is to test it in the EJB? But wouldn't it be strange to validate something that i can get simple in a try-catch? (Why bother verifying something that the database will verify to me anyway?)


      Thks


      Israel