1 Reply Latest reply on Nov 19, 2008 9:19 AM by Adrian Brock

    race condition msg delivery / db tx commit

    Dieter Cailliau Newbie

      I believe that there is no way to guarantee that a jms message gets delivered only after the db-tx has completed (and made its changes visible), even if java:/JmsXA is used.

      Therefore, my MDB can not find the data created in the tx in the database, because the message delivery is too fast.

      So my explanation for this is: 2 phase commit guarantees that all resources will commit (end of phase 1), but it does not guarantee any timing about it, therefore the thread handling the message may read the db sooner than the db makes its changes visible.

      Is this a valid statement? If so, can i tweak the db tx isolation level somehow to see these "promised to get committed, but not yet committed" data?

      Or is it just wrong, and why?

      This problem has been described here as well http://www.jboss.com/index.html?module=bb&op=viewtopic&t=138173