I have created an MDB that is a Durable Subscriber and is not receiving any messages posted to it's topic (topic/testDurableTopic for now).
I am running JBoss 3.2.1 with Java 1.4.2-b28. I have also tried different JBoss's and Java's so I presume the problem is something to do with what I am doing.
* trans-attribute is set to NotSupported
<configuration-name>Standard Message Driven Bean</configuration-name>
post to topic code snippet:
InitialContext ctx = new InitialContext();
// XATopicConnectionFactory topicConnectionFactory = (XATopicConnectionFactory)ctx.lookup("OIL2XAConnectionFactory");
XATopicConnectionFactory topicConnectionFactory = (XATopicConnectionFactory)ctx.lookup("XAConnectionFactory");
TopicConnection topicConnection = topicConnectionFactory.createTopicConnection("eventmanager", "");
Topic topic = (Topic)ctx.lookup("topic/testDurableTopic");
TopicSession topicSession = topicConnection.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE);
// Create message
MapMessage message = topicSession.createMapMessage();
// Load message with info from LavaEvent
TopicPublisher topicPublisher = topicSession.createPublisher(topic);
// this runs and doesn't throw an exception...
* I have added the 2 users to jbossmq-state.xml. These users were added to all roles.
The jmx-console page for the topic shows that the DurableSubcribers increases to 1 when I deploy. The listener just does a System.out.println (and some logging) at the moment. As this never reaches the console (or logging to the log files), I presume my listener is never being called.
Most of the samples I have found are for Queue's. Is there any samples for DurableSubscription? Alternatively if you can see a silly mistake in my stuff could you please let me know?
Any help is appreciated. Thanks, Adrian