PrintWriter out = arg1.getWriter();
QueueConnection connection = qcf.createQueueConnection();
connection.start();
QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver queueReceiver = session.createReceiver(queue);
Message msg = queueReceiver.receiveNoWait();
if ( msg instanceof TextMessage ) {
TextMessage txtMsg = (TextMessage)msg;
System.out.println("Message : "+txtMsg.getText());