4 Replies Latest reply on Aug 21, 2002 7:42 PM by amitshetty

    Durable MDB

    navneet

      I am new to MDB and J2EE.I have a strange problem and cant figure out how to do it.

      I have a Topics on JMS server and users with username. The system uses JMS and send an SMS to these users if a message arrive on a topic they subcribe. What i was doin is when a user subscribe to a topic i create a durablesubscribtion using the username and add it as listener. So for every subscriber there is a listener.

      Actually this is built by someone else and not i have to change it to use MDB and i do not know how to create many instanses of this MDB each listening for a particalar user.

      Can anyone please help

        • 1. Re: Durable MDB
          adiraju

          Similar Problem here. I cant get Durable MDB working.

          I get the following exception when i change NonDurable to Durable in ejb-jar.xml.

          15:28:04,656 WARN [JMSContainerInvoker] JMS provider failure detected:
          org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null
          at org.jboss.mq.Connection.addConsumer(Connection.java:974)
          at org.jboss.mq.SpyConnectionConsumer.(SpyConnectionConsumer.java:73)
          at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnection.java:102)
          at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:548)


          There was an earlier thread on this topic which ran dry.

          Can somebody put together a small summary/tutorial for MDB/JMS config on JBoss 3.0.0. There is a lot of confusion going through current open documentation. Many different xml's have changed.

          • 2. Re: Durable MDB
            joelvogt

            Durable mdb's do work, but the problem you may have is that mdbs can only subscribe durably to one destination. (If I remember correctly ;)) As such, might not fix the first problem.

            As for getting it to work, probably easiest thing to do is put a brief post of your xml config so we can have a look for you

            • 3. Re: Durable MDB
              giorgio42


              I do not have enough time to put together a tutorial,
              but I ran into the same problem, and it was a typo
              in my jboss.xml file (wrote "mdb-subscriber-id" instead
              of "mdb-subscription-id").

              Make sure you have the DTD declared correctly at the top
              of the jboss.xml file, so that the XML parser can catch this.

              May be it is of help to you...

              Georg

              • 4. Re: Durable MDB
                amitshetty

                Thank you very much! I had exactly the same problem.
                subscriver instead of subscription