public javax.jms.Message receive(String destination, long timeout) throws javax.jms.JMSException { ReceiveDispatcher dispatcher = null; try { dispatcher = new ReceiveDispatcher(this.connection, destination); Message msg = dispatcher.receive(timeout); return msg; } finally { if (dispatcher != null) { dispatcher.stop(); } } }