1 2 Previous Next 19 Replies Latest reply on May 20, 2010 10:49 AM by dfisher Go to original post
      • 15. Re: Durable messages and MDB with selector
        jaikiran

        Andy Taylor wrote:

         

        for some reason your MDB's are being deployed twice each (see below)

         

        can you double check you ear or provide buildable src.

         

        13:12:50,164 INFO  [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableNoSelectorMDB ejbName: DurableNoSelectorMDB
        13:12:50,566 INFO  [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableNoSelectorMDB ejbName: DurableNoSelector
        13:12:51,025 INFO  [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableSelectorMDB ejbName: DurableSelectorMDB
        13:12:51,330 INFO  [EJBContainer] STARTED EJB: org.hornetq.test.mdb.DurableSelectorMDB ejbName: DurableSelector

         

        The deployment contains a ejb-jar.xml with:

         

         

        <?xml version="1.0" encoding="ISO-8859-1"?>
        <ejb-jar version="3.0"
          xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
          <enterprise-beans>
            <message-driven>
              <ejb-name>DurableSelector</ejb-name>
              <ejb-class>org.hornetq.test.mdb.DurableSelectorMDB</ejb-class>
            </message-driven>
            <message-driven>
              <ejb-name>DurableNoSelector</ejb-name>
              <ejb-class>org.hornetq.test.mdb.DurableNoSelectorMDB</ejb-class>
            </message-driven>
          </enterprise-beans>
        </ejb-jar>

         

         

        So the same MDB is being mapped twice to two different names. For example, the MDB class DurableNoSelectorMDB is once deployed as an EJB with the name DurableNoSelectorMDB through annotations and once through the ejb-jar.xml with a different name DurableNoSelector.

         

        Looking at the ejb-jar.xml, I guess Daniel can just get rid of that file altogether.

        • 16. Re: Durable messages and MDB with selector
          ataylor

          could u fix your ear and retest and confirm either way if it is still an issue

          • 17. Re: Durable messages and MDB with selector
            dfisher

            My apologies for the bad config.

            I removed the ejb-jar.xml and confirmed each MDB is only deployed once.

            See the attached ear.

            I'm still seeing messages lost for the durable subscription with the selector.

            • 18. Re: Durable messages and MDB with selector
              ataylor

              This is now fixed in trunk.

               

              The issue was that we were recreating the subscription queue every time when we shouldnt only when the selector changed. Feel free to test trunk now.

               

              FYI remember that if you do change the selector this will basically re create the subscription as new and only receive messages from that point in time.

               

              thanks for the heads up on this and providing s a test that we can actually use, be great if everyone did this

              • 19. Re: Durable messages and MDB with selector
                dfisher

                Confirmed the fix using r9249.

                Thanks everyone.

                1 2 Previous Next