code: private static final String toDeliveryModeString(int acknowledgeMode) {
          switch (acknowledgeMode) {
          case Session.AUTO_ACKNOWLEDGE:
              return "AUTO_ACKNOWLEDGE";
          case Session.CLIENT_ACKNOWLEDGE:
              return "CLIENT_ACKNOWLEDGE";
          case Session.DUPS_OK_ACKNOWLEDGE:
              return "DUPS_OK_ACKNOWLEDGE";
          default:
              throw new IllegalArgumentException("Unknown JMS Acknowledge mode " + acknowledgeMode + " (See javax.jms.Session for valid values)");
          }
      }
docs: Return a friendly string for the given JMS acknowledge mode, or throw an IllegalArgumentException if
  the mode is not recognized.
  <p/>
  Possible values:
  <ul>
  <li>javax.jms.Session.AUTO_ACKNOWLEDGE</li>
  <li>javax.jms.Session.CLIENT_ACKNOWLEDGE</li>
  <li>javax.jms.Session.DUPS_OK_ACKNOWLEDGE</li>
  </ul>
  @param acknowledgeMode A valid JMS acknowledge mode
  @return A friendly string describing the acknowledge mode
  @throws IllegalArgumentException if the mode is not recognized