1 Reply Latest reply on Feb 22, 2011 4:13 PM by Clebert Suconic

    Are topics created by the core api available to JMS clients?

    Glyn Walters Newbie

      I'm running the standalone server with the JNDIServer and JMSServerManager enabled. I connect with a core client api to the server using TransportConfiguration with the ClientSessionFactory. I have then been creating topics as such:

       

      ClientProducer producer = session.createProducer();

      Topic topicEUR1S = HornetQJMSClient.createTopic("jms.topic.EUR.TS.1000");

      Topic topicEUR1M = HornetQJMSClient.createTopic("jms.topic.EUR.TS.60000");

      ClientMessage message = session.createMessage(true);

      message.putDoubleProperty("CLOSE", 1.2345);

      connection.start();

      producer.send(topicEUR1S.getTopicName(), message);

       

      Then another client using the JMS api attempts to lookup one of the topics:

       

      Hashtable<String, String> args = new Hashtable<String, String>();

      args.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

      args.put(Context.PROVIDER_URL, "jnp://localhost:1099");

      ic = new InitialContext(args);

      ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");

      connection = cf.createConnection();

       

      Topic topEUR1S = (Topic)ic.lookup("/topic/EUR/TS/1000");

       

      But it's not available. (I can lookup a topic that is configured in the hornetq-jms.xml). Should I expect the topics that are created by the core api to be populated into the JNDI server?

       

      Thanks