Hi All,
I am having problems with have an MDB registering as a Durable Topic Subscriber.
I am getting the following problem
WARN [JMSContainerInvoker] JMS provider failure detected:
javax.jms.JMSException: Null or empty subscription
at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnection.java:112)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:586)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
Here is the snippet of the jboss xml file
<message-driven>
<ejb-name>EmvolveLogBean</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>
<mdb-subscription-id>Tester</mdb-subscription-id>
</message-driven>
In my client class that publishes to the topic
TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("java:/ConnectionFactory");
Topic topic = (Topic) ctx.lookup("topic/testDurableTopic");
TopicConnection connection = factory.createTopicConnection("john","needle");
TopicSession session = connection.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE);
connection.start();
TopicPublisher sender = session.createPublisher(topic); TextMessage message = session.createTextMessage();
message.setText("Did u get me ");
sender.publish(message);
session.commit();
session.close();
connection.close();
I have made sure that the roles are correct but there is one issue I have..
In the jbossmq-state.xml the DurableSubscriptions element is empty, should I need to have some entry in here example
DurableSubscriberExample
Tester
testDurableTopic
I am using Jboss-3.2.3
But If i add this I get problems with the AS complaining it depends on other modules.
Any help is greatly appreicated
danny
The error messages says it is not using the jboss.xml snippet you post.
Hard to tell why not without further information.