3 Replies Latest reply on Jul 30, 2013 10:30 AM by Jeff Mesnil

    Wildfly Alpha3, Dynamic queue creation and jndi lookup

    Maycon Oliveira Newbie

      Hi there.

       

      Currently, I have a JMS project that the remote clients creates its on queues and then connects to it.

       

      Today i´m using the core API to do this:

       

      First i use JMX:

       

      private JMSServerControl jmsServerControl
      ...
      

       

       

      and after this, i connect to the queue:

       

      ...
      HornetQConnectionFactory fac = new HornetQConnectionFactory(
                                              false,
                                              transportConfiguration);
      ...
      

       

       

       

       

      But now, i´m trying to switch to pure JMS doing JNDI lookup.  After a small fight with the remote URL I connected with the server with:

       

      private static final String PROVIDER_URL = "http-remoting://localhost:8080";
      

       

       

      But now i need to discover how to create the JNDI destinations dynamically. The queue "queue.Teste" exists, but the JNDI name doesnt.

       

      Exception in thread "main" javax.naming.NameNotFoundException: queue/Teste -- service jboss.naming.context.java.jboss.exported.queue.Teste

       

       

       

      Any hints to achieve this?

       

       

       

      PS: What i´m trying to do is exactly what this JIRA is saying, https://issues.jboss.org/browse/HORNETQ-302

       

       

       

       

      Thanks !!!