Instantiate JMS Resources without using JNDI
7.5. Directly instantiating JMS Resources without using JNDI Although it's a very common JMS usage pattern to lookup JMS Administered Objects (that's JMS Queue, Topic and ConnectionFactory instances) from JNDI, in some cases a JNDI server is not available and you still want to use JMS, or you just think "Why do I need JNDI? Why can't I just instantiate these objects directly?" With HornetQ you can do exactly that. HornetQ supports the direct instantiation of JMS Queue, Topic and ConnectionFactory instances, so you don't have to use JNDI at all. For a full working example of direct instantiation please see the JMS examples in Chapter 11, Examples.