5 Replies Latest reply on Oct 25, 2004 6:03 AM by Matteo Maria Pileggi

    COnfigure MDB- Durable subscription

    vindiayns Newbie

      Hi,

      I want to test durable subscription using MDB I am Jboss3.2.5.
      I am facing configuration problem. please correct if I am doing something wrong.

      I did the following configurations

      ejb-jar.xml
      ---------------------------------------------------------------------------------
      <enterprise-beans>
      <message-driven>
      <ejb-name>MessageSelectorBean</ejb-name>
      <ejb-class>mbean.MessageSelectorBean</ejb-class>
      <message-selector>shirtType = 'polo'</message-selector>
      <transaction-type>Container</transaction-type>
      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      <subscription-durability>Durable</subscription-durability>
      </message-driven-destination>
      </message-driven>

      ----------------------------------------------------------------------------------
      jboss.xml


      <message-driven>
      <ejb-name>MessageSelectorBean</ejb-name>
      <destination-jndi-name>topic/testDurableTopic</destination-jndi-name>
      <mdb-user>john</mdb-user>
      <mdb-passwd>needle</mdb-passwd>
      <mdb-client-id>DurableSubscriberExample</mdb-client-id>
      </message-driven>


      ------------------------------------------------------------------------------------
      jbossmq-state.xml



      john
      needle
      DurableSubscriberExample

      DurableSubscriberExample
      testDurableTopic




      john

      ------------------------------------------------------------------------------------
      jbossmq-destinations-service.xml


      <mbean code="org.jboss.mq.server.jmx.Topic"
      name="jboss.mq.destination:service=Topic,name=testDurableTopic">
      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
      <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager









      ----------------------------------------------------------------------------------

      I am getting the following error,

      ------------------------------------------------

      [JMSContainerInvoker] JMS provider failure detected:
      javax.jms.JMSException: Null or empty subscription
      at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnect
      ion.java:151)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
      rInvoker.java:672)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
      erInvoker.java:764)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      -------------------------------------------------------------------------------

      I got stuck .any help is highly appreciated

      Thank you.