TextMessage rm = (TextMessage)qreceiver.receive(5000);
TextMessage rm = (TextMessage)qreceiver.receive(1000);
   public void test_1() throws Exception   {      QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");      Queue queue = (Queue)ic.lookup("/queue/Queue");      QueueConnection qc =  qcf.createQueueConnection();      QueueSession qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);      QueueReceiver qreceiver = qs.createReceiver(queue, "targetMessage = TRUE");      qc.start();      TextMessage m = qs.createTextMessage();      m.setText("something");      m.setBooleanProperty("targetMessage", false);      QueueSender qsender = qs.createSender(queue);      log.info("sending first message");      qsender.send(m);      m.setBooleanProperty("targetMessage", true);      log.info("sending second message");      qsender.send(m);      TextMessage rm = (TextMessage)qreceiver.receive(5000);      assertEquals("something", rm.getText());      qc.close();   }