code: private void validateTTLAndDD(long timeToLive) throws JMSException {
          // There is no point continuting when expiry/timetolive time is earlier than the deliveryDelay
          if (getDeliveryDelay() > 0 && timeToLive > 0) {//only if its non default value
              if (timeToLive <= getDeliveryDelay()) {
                  throw (JMSException) JmsErrorUtils.newThrowable(
                                                                  JMSException.class,
                                                                  "INVALID_VALUE_CWSIA0070",
                                                                  new Object[] { getDeliveryDelay(), timeToLive },
                                                                  tc
                                  );
              }
          }
      }
docs: Validates timetoLive and deliverydelay values.Throws exception if there is a problem
  
  @param timeToLive
  @throws JMSException