2 Replies Latest reply on Dec 17, 2004 12:42 PM by André Piza

    Problems with durable topic in jboss-3.2.3

    André Piza Newbie

      Hy,

      I'm trying to make a durable topic with MDB as client. Everything seems to work fine but the bean does nothing.
      I'm using the example configuration testDurableTopic
      user: john
      passwd: needle

      Here an extract from my publisher and consumer:

      Publisher =========

      ...
      TopicConnectionFactory topicConnectionFactory = ServiceLocator.getInstance().getTopicConnectionFactory("ConnectionFactory");
      conn = (TopicConnection) topicConnectionFactory.createTopicConnection();
      session = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
      Topic topic = ServiceLocator.getInstance().getTopic("topic/testDurableTopic");
      TopicPublisher publisher = session.createPublisher(topic);
      ObjectMessage message = session.createObjectMessage(msg);
      publisher.publish(topic, message);

      ...
      Consumer ==========
      ... onMessage ...

      Object o = ((ObjectMessage) msg).getObject();
      doSomething(o);
      ...

      jboss.xml =========
      ...
      <message-driven>
      <ejb-name>MyMDB</ejb-name>
      <destination-jndi-name>topic/testDurableTopic</destination-jndi-name>
      <mdb-user>john</mdb-user>
      <mdb-passwd>needle</mdb-passwd>
      <mdb-subscription-id>DurableSubscriberExample</mdb-subscription-id>
      </message-driven>
      ...
      ejb-jar.xml =========
      ...
      <message-driven >
      <![CDATA[blablabla]]>
      <ejb-name>MyMDB</ejb-name>
      <ejb-class>MyClassPath</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>
      ...
      ==========

      Any comments,

      Thanks in advance,

      André Piza

        • 1. Re: Problems with durable topic in jboss-3.2.3
          Adrian Brock Master

          Adrian,

          This was a very strange error.

          I did a lot of things and I don't know why but I've fix the problem, so I won't be able to send the error message anymore.

          Anyway we have a very complex build envy and maybe you've got the point. For an unknown reason the bean wasn't deployed ok or the service (corretc jndi and suport stuff) wasn't fine.

          Although Loggin said that the bean was deployed
          next time I'll check te jmx-console to see if the service was ok.

          Thanks a lot.

          André Piza

          • 2. Re: Problems with durable topic in jboss-3.2.3
            André Piza Newbie

            Adrian,

            This was a very strange error.

            I did a lot of things and I don't know why but I've fix the problem, so I won't be able to send the error message anymore.

            Anyway we have a very complex build envy and maybe you've got the point. For an unknown reason the bean wasn't deployed ok or the service (corretc jndi and suport stuff) wasn't fine.

            Although Loggin said that the bean was deployed
            next time I'll check te jmx-console to see if the service was ok.

            Thanks a lot.

            André Piza