5 Replies Latest reply on Jun 27, 2007 5:24 PM by lafr

    Message visible before transaction commit

    martiro

      Hi everybody
      This is my problem: I have 2 Message Driven Beans (let's call them MDB1 and MDB2). MDB1 performs the step1 and MDB2 performs the step2
      MDB1 receive messages from a queue, mekes elaboration on it, and, if everything works fine, it put the message in a queue (that is the destination of MDB2) and it completes the operation updating a database to say that the message has completed the step 1 succesfully.
      My problem is the following: as soon the method sender.send(message) is called the MDB2 is activated, even if the transaction in MDB1 is not completed. You can see it very well debugging step-by-step. This is a BIG problem.
      I've done some test case. I report the worst of them: I've tried to throw an Exception after the DB update (that is: send(message); uptate database; throw exception ). The result is te following the database update rollbacks succesfully but at that time the message has already completed the elaboration passing through the followin MDB.
      Is this a bug of JMS implementation or is there a configuration parameter to set up this behavior?
      Thanks in advance for every help you'll give me.