I am new to HornetQ. I was following the example for a non JNDI connection simply getting my feet wet with HornetQ.
I created the transport config, Queue Object, and Connection Factory, obtained a connection through the connection factory and got a session. When I attempt to create a producer, I get the destination queue does not exist.
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName() );
Queue queue = HornetQJMSClient.createQueue("exampleQueue");
ConnectionFactory cf = (ConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
connection = cf.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
producer = session.createProducer( queue );
I can see the queue defined in hornetq-jms.xml
<!--the queue used by the example-->
I read in the users guide and the help file for the example that the queue must exist first. How does the queue get created. prior to running the example. Does HornetQ read the hornetq-jms.xml file during program execution?
Any help would be appreciated.