I want a Message Driven Bean that subscribes to a durable topic. From the documentation (jbossbook321.pdf) I have picked up a few examples but the examples that work with durable topics do not relate to MDBs.
Since the publisher has got nothing to do with the durability aspect of the topic, I am assuming that I only need to modify the MDB itself.
Since as a MDB developer, I am only providing the onMessage method, I am assuming (correctly?) that JBoss is setting up the TopicSubscriber for me and all I need to do is tell JBoss that I want a durable TopicSubscriber by calling the createDurableSubscriber method on the TopicSession.
Have I got that right?
Therefore, I have added the following line to my ejb-jar.xml:
but this is giving me the following error:
15:21:51,053 WARN [JMSContainerInvoker] JMS provider failure detected:
javax.jms.JMSException: Null or empty subscription
I think JBoss is telling me that I haven't supplied a username, password and a name that uniquely identifies the subscription. Only, where do I specify that?
Another question regarding the subscription identifier. Since there will probably be more than one instance of the MDB subscribing to the same topic, I think JBoss should actually use the beans hash code as this is the only thing that distinguishes instances of the same MDB no?
Is there anybody that can help me with that.