0 Replies Latest reply on Sep 6, 2005 10:19 AM by Vinicius Carvalho

    setRollBackOnly question

    Vinicius Carvalho Newbie

      Hello there! This is a basic question, it's more related to ejb-spec I guess, but since JBoss is my default AS, I hope you guys could help me out here ;)

      Ok, I have an MDB with CMT. This MDB calls an ApplicationService (just a POJO) that performs our business logic. In case something bad happens, let's say, an SQL error from Hibernate, one should rollback the transaction.

      My question is suppose my onMessage(Message message) method has this snippet:

      }catch(BusinessLogicException ex){

      This will rollback my transaction, but also cause my message to be re-delivered right? I've seen implementations with BMT where we could acknowledge the message, but I really would like to keep using CMT.

      Well, my question is just about the behaviour of the conteiner, is this what really happens when a rollback is issued from a MDB?

      I guess avoiding redelivery should be easy since you guyse helped me with that in another topic ;)

      Thanks all..