4 Replies Latest reply on Dec 7, 2001 3:11 AM by Ferdinand Che

    MDB and Durable subscriptions

    Ferdinand Che Newbie

      Hi,

      I am having trouble deploying my MessageDrivenBean with durable subscription.

      I know MDB are supposed to be pooled by the container just like session EJBs but I am not sure why my MDB fails when I attempt to deploy it with the following conf:

      <jboss-install-dir>/conf/tomcat/jbossmq-state.xml (Jboss 2.4.3-Tomcat3.2.3):

      orderValidation
      orderValidationpass
      OrderValidationMDB

      OrderValidationMDB
      IncomingOrdersTopic



      <jboss-install-dir>/conf/tomcat/ejb-jar.xml:

      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      <subscription-durability>Durable</subscription-durability>
      </message-driven-destination>

      The rest of the jboss.jcml and other configuration settings are correct.

      The MDB fails to deploy and the exception message is "Can't create durable subscriber ..."

      Is there a way in which I am supposed to specify with user/password is associated with the particular MDB or one just assumes that JBoss makes an informed guess from jbossmq-state.xml????

      The other issue is that, as MDB instances are pooled, it is actually possible to have MDBs with durable subsrciptions at all??? -would the clientID's then not clash???

      Thanks for your help.

      Ferdinand

        • 1. Re: MDB and Durable subscriptions
          Peter Antman Expert

          jboss-state: client id must be defined here.

          Pooling: there is only one connection and one consumer, so no problem here. Its the sessions and beans that are pooled (the real gain is that you may have multithreaded topics which is not possible on strait JMS).

          //Peter

          • 2. Re: MDB and Durable subscriptions
            Ferdinand Che Newbie

            Hi Peter,

            I am sorry, I am not with you here. How do you do that - I have not seen any config file called "jboss-state" and how to configure this.

            Would you mind to elaborate please.

            Regards,
            Ferdinand

            • 3. Re: MDB and Durable subscriptions
              Peter Antman Expert

              Should have been jbossmq-state, but I do not know anything more about this stuff than I have covered in the chapter (MDB:s I know more about, since I wrote that container). Sorry.

              //Peter

              • 4. Re: MDB and Durable subscriptions
                Ferdinand Che Newbie

                Hi,

                I have spotted my own errors. I had omitted the corresponding entries in the jboss.xml file which would have associated the user/password for the MDB with the corresponding topic.

                So the correct entry in y jboss.xml to match the entries in the jbossmq-state.xml should have been:

                jboss.xml:

                <message-driven>
                <ejb-name>OrderValidationMDB</ejb-name>
                <configuration-name>Standard Message Driven Bean</configuration-name>
                <destination-jndi-name>topic/IncomingOrdersTopic</destination-jndi-name>
                <mdb-user>someOtheruser</mdb-user>
                <mdb-passwd>someOtherpasswd</mdb-passwd>
                <mdb-client-id>OrderValidationMDB</mdb-client-id>
                </message-driven>

                To match: (jbossmq-state.xml)

                someOtheruser
                someOtherpasswd
                OrderValidationMDB

                OrderValidationMDB
                IncomingOrdersTopic



                Thanks for your help Peter.

                Regards,
                Ferdinand