I want to declare a queue by Java JMS api. I write a JNDI property file and I
am not sure which code below is declaring the queue.
context = new InitialContext(getProperties());
ConnectionFactory conFac = (ConnectionFactory) context
.lookup(address.getConnectionFactory());
connection = conFac.createConnection();
Destination destination = (Destination) context.lookup(address
.getQueueName());
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer messageConsumer = session
.createConsumer(destination);
messageConsumer.setMessageListener(endpoint);
connection.start();
--
View this message in context:
http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-declare-a-queue-on-JMS-api-tp5459422p5459422.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]