else {   channel.deliver(); }
   public synchronized void cancelMessage(Serializable messageID) throws JMSException   {      boolean cancelled = false;      Iterator iter = deliveries.iterator();      try      {                  while (iter.hasNext())         {            Delivery del = (Delivery)iter.next();            if (del.getReference().getMessageID().equals(messageID))            {               del.cancel();               cancelled = true;               break;            }         }      }      catch (Throwable t)      {         log.error("Failed to cancel message", t);         throw new IllegalStateException("Failed to cancel message");      }      if (!cancelled)      {         throw new IllegalStateException("Cannot find delivery to cancel");      }   }