context.lookup(AQInitialContextFactory.XA_QUEUE_CONNECTION_FACTORY);
connection = queueConnectionFactory.createXAQueueConnection();
session = connection.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
Queue queue = (Queue) context.lookup(qName);
messageConsumer = session.createReceiver(queue);
connection.start();
TextMessage receiveMessage = session.createTextMessage(MESSAGE_CONTENT);
while (receiveMessage!=null) {
receiveMessage = (TextMessage) messageConsumer.receive(10);
if (receiveMessage!=null) System.out.println("Drain:" + receiveMessage.getText());