3 Replies Latest reply on Oct 13, 2006 3:29 AM by Thomas Lemmen

    Missing massage after database crash

    Thomas Lemmen Newbie

      Hi all,
      I have a big problem with my message queue after a database crash. I use JBoss 4.0.3SP1 and Hypersonic as persistancemanager for my message queue. Oracle 9i to persist my data. What I have done is, that I cut the database connection (with a small tcp-proxy, no oracle shutdown) and put four messages manually in the queue - successively. After I repaired the connection (restart the proxy) the first message is gone and the others are available.

      In my message bean I test the database connection in the onMessage method. If she fails I rollback the transaction with context.setRollbackOnly() and return. In the servers log file I can see, that the first message reaches several times the onMessage method, but only in 20% of cases after the refresh of the database connection. She is lost in 80% of my tests!

      For my topic bean I use container managed transaction with trans-attribute required. In the oracle-ds.xml the parameter valid-connection-checker-class-name is set to refresh broken connections. If I start a mass test with 100 or 1000 messages in a loop I find all messages in the database.

      Can somebody help me? What did I wrong because I can't imagine that JBoss has a leak in his transactional saves queue.

      Bye,
      Thomas