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

    Missing massage after database crash

    thlemmen

      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

        • 1. Re: Missing massage after database crash
          genman

          Anything interesting in the logs?

          • 2. Re: Missing massage after database crash
            thlemmen

            There is really nothing to see in the log! From here I have the information, that the first message is vanished (log4j output with the message id after entering onMessage).

            he one thing I can add is, how I put the message manually in the queue: I use a small jUnit test which put one message with XML data in the queue. I write down the generated id from the XML which I write to System.out and run the next test. May be that could help a little more....

            Many thanks for your efforts in advance :o)

            • 3. Re: Missing massage after database crash
              thlemmen

              Sorry!

              Another thing I can add is (also information from the logs), that 5 seconds before the database connection is rebuild the first message is provided the last time by the onMessage method. And every 3 seconds in the time before.