1 Reply Latest reply on Nov 26, 2004 10:21 AM by casasj

    MDB with durable subscription help

    adini

      Hello,

      I try to run a simple MDB that is listening to a Durable Topic.
      But when I deploy it in Jboss4.0.0 I have got the following error:

      javax.jms.JMSException: Null or empty subscription
      at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnect
      ion.java:151)

      I think I miss something in the configuration of Jboss in particular for the durable Topic . If someone can help me

      I saw that it was usefull to add the name of our topic in conf/jbossmq-state.xml. I did as follow:


      XferRequestTopic


      here are my ejbjar.xml and jboss.xml files:

      <ejb-jar>
      
       <description>Deployment descriptor about Oriade EJB application</description>
       <display-name>OriadeEJB</display-name>
       <enterprise-beans>
      
      <!-- ************************************** MDB BEANS ************************************** -->
      
       <!-- AdminAgent's MDB beans -->
      
      
      
       <!-- XferAgent's MDB beans -->
      
       <message-driven>
       <description>Mdb for messages received about transfers</description>
       <display-name>Message Driven Bean MdbJbossTest</display-name>
       <ejb-name>MDBJbossTest</ejb-name>
       <ejb-class>com.iratensolutions.test.jboss.MDBJbossTest</ejb-class>
       <transaction-type>Bean</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>
       </message-driven>
       </enterprise-beans>
      </ejb-jar>
      


      jboss.xml:

      <jboss>
      <enterprise-beans>
      
      <!-- ************************************** MDB BEANS ************************************** -->
      
       <!-- XferAgent's MDB beans -->
      
       <message-driven>
       <ejb-name>MDBJbossTest</ejb-name>
       <destination-jndi-name>topic/XferRequestTopic</destination-jndi-name>
       </message-driven>
      </enterprise-beans>
      </jboss>


        • 1. Re: MDB with durable subscription help
          casasj

          I had the same problem, and my fault was in jboss.xml of the MDB don't specify the parameters:

          <mdb-user>user</mdb-user>
          <mdb-passwd>pwd</mdb-passwd>
          <mdb-subscription-id>subsid</mdb-subscription-id>

          to perform the log. After set this parameters, works fine.

          Jordi.