title: Getting queues HornetQ list from Java code
body: <p>I've tried to get the list of currently active <code>HornetQ</code> queues like this:</p>
  
  <pre><code>ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), getConfigMap()));
  ClientSessionFactory factory = locator.createSessionFactory();
  
  ClientSession session = return factory.createSession(true, true, 0);
  
  ClientSession.BindingQuery result = session.bindingQuery(new SimpleString("localhost"));
  
  System.out.println(result.getQueueNames().size());
  </code></pre>
  
  <p>But it returns <code>0</code>. Looks like I've performed wrong <code>BindingQuery</code> but I didn't find any examples in documentation.</p>