consumer.close();
   public void testTemporaryQueueDeleted() throws Exception   {      //Make sure temporary queue cannot be used after it has been deleted            TemporaryQueue tempQueue = producerSession.createTemporaryQueue();            MessageProducer producer = producerSession.createProducer(tempQueue);            MessageConsumer consumer = consumerSession.createConsumer(tempQueue);            connection.start();            final String messageText = "This is a message";            Message m = producerSession.createTextMessage(messageText);            producer.send(m);            TextMessage m2 = (TextMessage)consumer.receive(2000);            assertNotNull(m2);            assertEquals(messageText, m2.getText());            tempQueue.delete();            try      {         producer.send(m);         fail();      }      catch (JMSException e) {}   }