1 Reply Latest reply on Jun 2, 2005 8:12 PM by Elias Ross

    MDB + setRollbackOnly question

    Vinicius Carvalho Newbie

      Hello there! I have an MDB which peforms some database related logic on its onMessage() method. If something bad happens, I'd like to rollback the transaction so nothing is persisted (I'm using hibernate). But when I do this:
      catch(Exception ex){

      It seems that the message receive is not acknowledge, and then the container ends up in an infinite loop trying to consume the message every time. What I'd like to happen is, on error, the message should be purged from the queue?

      Any ideas?

      Best regards


      PS: Didn't put all the code and descriptors here, to let the msg clean. If required to help please let me know.