0 Replies Latest reply on Jan 12, 2007 5:51 AM by bob82

    MDB doesn't catch exceptions

    bob82

      Hi everybody,
      i have a problem: i have a MDB that, after receiving messages from a queue, calls an EJB method to store on DB.
      If the storing raise an exception the ejb doesn't catch the exception, but the transaction rollbacks and, after 10 times, the message is sent to DLQ, without advise.
      In server.log i see the SQL exceptions, but at code level i can't.

      The code in EJB is:

      try {
       entManager.merge(mail);
      } catch (Exception e) {
       ejbContext.setRollbackOnly();
       throw new DBStoringException("Error update", e);
      }
      


      Does anyone know how can i be advised of failures?

      thanks