code: private void validateDeliveryMode(int deliveryMode) throws JMSException {
          switch (deliveryMode) {
              case DeliveryMode.NON_PERSISTENT:
              case DeliveryMode.PERSISTENT:
                  // OK - no problems.
                  break;
              default:
                  throw (JMSException) JmsErrorUtils.newThrowable(
                                                                  JMSException.class,
                                                                  "INVALID_VALUE_CWSIA0068",
                                                                  new Object[] { "JMSDeliveryMode", "" + deliveryMode },
                                                                  tc
                                  );
          }
      }
docs: Validates the deliveryMode property, throwing an exception if there is a problem.