ref.getMessage().setRedelivered(true);
   public boolean cancel(Delivery d) throws Throwable   {      if (log.isTraceEnabled()) { log.trace("cancel " + d); }      if (!state.remove(d, null))      {         return false;      }      if (log.isTraceEnabled()) { log.trace(this + " canceled delivery " + d); }      MessageReference ref = d.getReference();      // mark it as redelivered      ref.setRedelivered(true);      // add the message at the top of the list      state.addFirst(ref);      if (log.isTraceEnabled()) { log.trace(this + " marked message " + d.getReference() + " as undelivered"); }      return true;   }