2 Replies Latest reply on Nov 23, 2004 4:46 PM by flindet

    Persistent messages not being deleted

    flindet Newbie

      Hi,

      About a week ago, our persistent messages for a prototype we're developing stopped working properly. Messages are written to the database, but are never deleted. An MDB receives the message and processes it properly, but the message is never deleted from the database.

      We're using JBoss 4.0. Oracle 9.2.0.3 is used to store the persistent messages. I've tried using AUTO_ACKNOWLEDGE and CLIENT_ACKNOWLEDGE, both with the same results.

      I've been trying to determine what has changed in my environment for this last week, but I have been unable to find it. Does anyone have any ideas that I might try? I'm stumped!

      Thank you.

        • 1. Re: Persistent messages not being deleted
          flindet Newbie

          Here is my ejb-jar.xml:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
          <ejb-jar>
           <display-name>RedialMessageJAR</display-name>
          
           <enterprise-beans>
           <message-driven>
           <display-name>RedialMessageEJB</display-name>
           <ejb-name>RedialMessageEJB</ejb-name>
           <ejb-class>gov.ca.doj.redial.receiver.RedialMessageBean</ejb-class>
           <transaction-type>Container</transaction-type>
           <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
           <message-driven-destination>
           <destination-type>javax.jms.Topic</destination-type>
           <subscription-durability>Durable</subscription-durability>
           </message-driven-destination>
           <resource-ref>
           <res-ref-name>jms/TopicConnectionFactory</res-ref-name>
           <res-type>javax.jms.TopicConnectionFactory</res-type>
           <res-auth>Container</res-auth>
           </resource-ref>
           <resource-env-ref>
           <resource-env-ref-name>jms/TopicName</resource-env-ref-name>
           <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
           </resource-env-ref>
           </message-driven>
           </enterprise-beans>
          
          </ejb-jar>
          


          • 2. Re: Persistent messages not being deleted
            flindet Newbie

            PROBLEM RESOLVED

            Sorry, I have resolved my problem. The problem was that another developer and I were usingdifferent subscription-id's when testing our MDB. This created two subscriptions in our JMS_SUBSCRIPTIONS table, causing the Topic to attempt delivery to both subscriptions. Because we only ran one MDB with one of the subscription-id's at any given time, messages would stack in the database due to the lack of a listener for one of the subscription-id's.

            This is a non-issue. The topic did exactly what it was supposed to do. We were just confused because we didn't expect two subscriptions. Sorry!