log.trace("Redelivered flag not set");
log.info("Redelivered flag not set");
      public synchronized void onMessage(Message message)      {         try         {            count++;                         TextMessage tm = (TextMessage)message;                        log.trace("Got message " + tm.getText() + " count=" + count);                        if (count == 1)            {               if (!tm.getText().equals("a"))               {                  log.trace("Expected a but was " + tm.getText());                  failed = true;                  latch.release();               }            }            if (count == 2)            {               if (!tm.getText().equals("b"))               {                  log.trace("Expected b but was " + tm.getText());                  failed = true;                  latch.release();               }            }            if (count == 3)            {               if (!tm.getText().equals("c"))               {                  log.trace("Expected c but was " + tm.getText());                  failed = true;                  latch.release();               }               else               {                  if (sess.getAcknowledgeMode() == Session.SESSION_TRANSACTED)                  {                     log.trace("Rolling back");                     sess.rollback();                  }                                 }            }            if (count == 4)            {               if (!tm.getText().equals("a"))               {                  log.trace("Expected a but was " + tm.getText());                  failed = true;                  latch.release();               }               if (!tm.getJMSRedelivered())               {                  log.trace("Redelivered flag not set");                  failed = true;                  latch.release();               }            }            if (count == 5)            {               if (!tm.getText().equals("b"))               {                  log.trace("Expected b but was " + tm.getText());                  failed = true;                  latch.release();               }               if (!tm.getJMSRedelivered())               {                  log.trace("Redelivered flag not set");                  failed = true;                  latch.release();               }            }            if (count == 6)            {               if (!tm.getText().equals("c"))               {                  log.trace("Expected c but was " + tm.getText());                  failed = true;                  latch.release();               }               if (!tm.getJMSRedelivered())               {                  log.trace("Redelivered flag not set");                  failed = true;                  latch.release();               }               else               {                  if (sess.getAcknowledgeMode() == Session.SESSION_TRANSACTED)                  {                     log.trace("Committing");                     sess.commit();                  }                                   latch.release();               }            }                     }         catch (JMSException e)         {            log.error(e);            failed = true;         }        }