0 Replies Latest reply on Oct 20, 2005 2:46 PM by Winston Ng

    txid not deleted in jms_transactions table upon failure-rest

    Winston Ng Newbie

      JBoss version: 4.0.1
      DB: PostgresSQL 7.4.6

      Test procedures:
      1. Sends 2000 objects into a JMS queue which is processed by MDBeans.
      2. Halfway through the processing, kill -9 the jvm to simulate a failure.
      3. JMS_MESSAGES table has 1000+ rows and 34 of them has txid != null, corresponding to the number of rows in JMS_TRANSACTIONS.
      4. Upon restarting jboss, all objects in the queue were eventually processed without any problem. JMS_MESSAGES table is now empty. However, JMS_TRANSACTIONS table still contains the 34 rows of txid.
      5. Sends another 2000 objects to the same queue. At some point, we'll see exceptions: org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constraint "jms_transactions_pkey".

      The exception is caused by the existing 34 rows of txid still persisting in the JMS_TRANSACTIONS table.

      So, my question is why the txid persists post handling of those messages during a failure-restart scenario? Is it somekind of configuration we're missing or should we manually clean up the txid upon a failure?