There is no jndi server with HornetQ embedded, you would either have to:
a) look up resource using HornetQJMSClient
b) instantiate a JNDI server your self and set it via jmsServer.setRegistry(BindingRegistry registry).
you will also have to make sure you have the appropriate netty acceptor configured.
1 of 1 people found this helpful
no, thats just a tutorial on using jndi.
You will need to instantiate a naming server yourself, how you do this depends on the naming server you use. For the standalone hornetq version we use the jboss naming server and instantiate it in the StandaloneNamingServer class, take a look at this to see how it works. you then set a JndiBindingregistry with the correct context for your naming server via the setRegistry method
Ok. Thank you, Andy!
Edit: I've finally got around to tackle my little JMS problem. For the purposes of my application I needed to run an embedded JMS server and a consumer on one JVM, and a producer on another JVM. Ended up using HornetQJMSClient, it worked like charm. I set up mock InitialContext ctx, and populated it (via ctx#bind) with contents of hornetq-jms.xml, instantiating objects via HornetQJMSClient. Andy, you've saved me a bucha' time, thank you so much!