-
1. Re: Can I connect remotely to an embedded JMS Server?
ataylor Apr 17, 2013 3:33 AM (in response to alexeyy)There is no jndi server with HornetQ embedded, you would either have to:
a) look up resource using HornetQJMSClient
or
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.
-
2. Re: Can I connect remotely to an embedded JMS Server?
alexeyy Apr 17, 2013 4:13 AM (in response to ataylor)>b) instantiate a JNDI server your self and set it via jmsServer.setRegistry(BindingRegistry registry).
Is this it?
-
3. Re: Can I connect remotely to an embedded JMS Server?
ataylor Apr 17, 2013 4:19 AM (in response to alexeyy)1 of 1 people found this helpfulno, 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
-
4. Re: Can I connect remotely to an embedded JMS Server?
alexeyy May 8, 2013 12:17 PM (in response to ataylor)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!