List of usage examples for javax.jms QueueSession toString
public String toString()
From source file:org.panksdmz.jms.tibco.MessageSenderBean.java
public void send() { try {/*from w ww . j av a2 s . c o m*/ QueueConnection connection = connectionFactory.createQueueConnection(); QueueSession session = connection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE); Queue queue = session.createQueue(sendQueueName); QueueSender sender = session.createSender(queue); TextMessage message = session .createTextMessage("Message @ " + CaliHDateTime.now().getTimeInMillis() + " from thread " + Thread.currentThread().getId() + " from session [" + session.toString() + "]"); sender.send(message); session.close(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } }