List of usage examples for javax.jms Session createTemporaryQueue
TemporaryQueue createTemporaryQueue() throws JMSException;
From source file:ubic.gemma.job.grid.util.JMSBrokerMonitorImpl.java
private MapMessage sendTaskSubmissionQueueDiagnosticMessage() throws JMSException { MapMessage reply = jmsTemplate.execute(new SessionCallback<MapMessage>() { @Override//from w w w . j ava 2 s . c om public MapMessage doInJms(Session session) throws JMSException { Queue replyTo = session.createTemporaryQueue(); Message message = session.createMessage(); message.setJMSReplyTo(replyTo); Queue queryQueue = session.createQueue("ActiveMQ.Statistics.Destination.tasks.submit"); MessageProducer producer = session.createProducer(queryQueue); MessageConsumer consumer = session.createConsumer(replyTo); producer.send(message); return (MapMessage) consumer.receive(5000); } }, true); return reply; }