Hello everybody,
I need help with the jboss JMS configuration. My problem is as follows:
I do not hava any message-driven-beans, but I do want to have some JMS
topics in my application. Now I try to configure jboss for this. I've
added the following lines to jbossmq.xml:

<Topic><Name>MyTopic</Name></Topic>

and when I use the jndiview, I see the following:

 +- topic (class: org.jnp.interfaces.NamingContext)
  |   +- example (class: org.jbossmq.SpyTopic)
  |   +- testTopic (class: org.jbossmq.SpyTopic)
  |   +- bob (class: org.jbossmq.SpyTopic)
  |   +- MyTopic (class: org.jbossmq.SpyTopic)
  |   +- metrics (class: org.jbossmq.SpyTopic)
  |   +- beancache (class: org.jbossmq.SpyTopic)
  |   +- testDurableTopic (class: org.jbossmq.SpyTopic)

I've got a client who wants to subscribe to that topic. I use the
following code to do this, but an Exception is thrown when I want to
create the topic subscriber.

[...]
String top = "MyTopic";
Topic topic;
TopicConnectionFactory tconFactory = (TopicConnectionFactory)
ctx.lookup("TopicConnectionFactory");
TopicConnection tconnection = tconFactory.createTopicConnection();

tconnection.setClientID(myUser);

TopicSession tsession = tconnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
  
    try {
      topic = (Topic) ctx.lookup(top);
    }
    catch (NamingException ne) {
      topic = tsession.createTopic(top);

      ctx.bind(top, topic);
    }

    String selector = "User IN ('" + user + "','all') or User LIKE '%" +
user + "%'";
        
    TopicSubscriber tsubscriber =
tsession.createDurableSubscriber(topic, user, selector, false);  // Here
the Exception is thrown
[...]

The Exception is as follows:

javax.jms.JMSException: Cannot subscribe to this Destination

        at org.jbossmq.SpyConnection.failureHandler(SpyConnection.java:318)

        at org.jbossmq.SpyConnection.addConsumer(SpyConnection.java:440)

        at org.jbossmq.SpySession.addConsumer(SpySession.java:416)

        at
org.jbossmq.SpyTopicSession.createDurableSubscriber(SpyTopicSession.java:100)

        at
com.bspartners.tnt.admin.util.TopicMessage.<init>(TopicMessage.java:143)

        at
com.bspartners.tnt.client.gui.MainWindowGUI.<init>(MainWindowGUI.java:190)

        at com.bspartners.tnt.client.TNTClient.main(TNTClient.java:44)

javax.jms.JMSException: That destination queue does not exist
        <<no stack trace available>>


So what did I miss to configure??

Thank you in advance,
Ralf

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to