3 Replies Latest reply on Aug 15, 2003 8:20 AM by Adrian Brock

    Configuration Durable Topic

    marcomanco Newbie

      Hello,

      I have the problem configurating a durable Topic.

      Can you tell me which JBoss-Files do I have to configure.

      I'm using JBoss 3.2.1!

      I have a message-driven-bean:


      ejb-jar.xml:

      <message-driven>
      description>
      <display-name></display-name>
      <ejb-name>SQLListenerBean</ejb-name>
      <ejb-class>com.jcoffee.base.sl.SQLListenerBean</ejb-class>
      <transaction-type>Container</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>

      jboss.xml

      <message-driven>
      <ejb-name>SQLListenerBean</ejb-name>
      <destination-jndi-name>jcoffee.jms.topics.SystemLoggingTopic</destination-jndi-name>
      <mdb-user>john</mdb-user>
      <mdb-passwd>needle</mdb-passwd>
      <mdb-subscriber-id>DurableSubscriberExample</mdb-subscriber-id>
      </message-driven>


      jbossmq-destinations-service.xml:


      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
      <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager

      jcoffee.jms.topics.SystemLoggingTopic












      With this configuration it doesn't work. I think I forgot something but I don't know where.
      If I start the JBoss-Server I always get exceptions like:

      org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null; - nested throwable: (java.lang.NullPointerException)
      at org.jboss.mq.Connection.addConsumer(Connection.java:1094)
      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:509)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1079)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:591)
      + nested throwable:
      java.lang.NullPointerException
      at org.jboss.mq.DurableSubscriptionID.hashCode(DurableSubscriptionID.java:79)
      at java.util.HashMap.get(HashMap.java:261)
      at org.jboss.mq.server.JMSTopic.addSubscriber(JMSTopic.java:77)
      at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.java:137)
      at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationManager.java:611)
      at org.jboss.mq.server.JMSServerInterceptorSupport.subscribe(JMSServerInterceptorSupport.java:296)
      at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:150)
      at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:677)
      at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:298)
      at org.jboss.mq.il.jvm.JVMServerIL.subscribe(JVMServerIL.java:315)
      at org.jboss.mq.Connection.addConsumer(Connection.java:1082)
      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:509)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1079)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:591)


      I don't have any experience with JMS / MDB.

      Maybe someone can help me! Thanx!