0 Replies Latest reply on Aug 6, 2007 11:24 AM by J-C jc

    How to force acknowledge in a MDB

    J-C jc Apprentice

      I have an EJB 3 MDB that listen on a queue. This MDB uses an EJB3 session bean. With some invalid parameters, session bean can send exception. In that case MDB will never be able to perform its job. In that case I'd like to log an error message and force the acknoledgmement of the message.

      Problem is that the session bean has thrown an excpetion. consequently tranqsaction is rollbacked, then message is redelivered later.

      If I invoke message.acknowledge() from the MDB, it looks that message is not acknoledge.

      How can I force a message to be acknoledge from a MDB ?

      I've try to make the MDB transaction not supported but I still not able to acknowledge the message.