Validates the timeToLive field and throws an exception if there is a problem.

@param timeToLive
@throws JMSException
497244
private void validateTimeToLive(long timeToLive) throws JMSException {
        if ((timeToLive < 0) || (timeToLive > MfpConstants.MAX_TIME_TO_LIVE)) {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0068",
                                                            new Object[] { "timeToLive", "" + timeToLive },
                                                            tc
                            );
        }

    }
120371
void validateIatAndExp(JwtClaims jwtClaims, long clockSkewInMilliseconds) throws InvalidClaimException {
		if (jwtClaims == null) {
			if (tc.isDebugEnabled()) {
				Tr.debug(tc, "Missing JwtClaims object");
			}
			return;
		}
		NumericDate issueAtClaim = getIssuedAtClaim(jwtClaims);
		NumericDate expirationClaim = getExpirationClaim(jwtClaims);

		debugCurrentTimes(clockSkewInMilliseconds, issueAtClaim, expirationClaim);

		validateIssuedAtClaim(issueAtClaim, expirationClaim, clockSkewInMilliseconds);
		validateExpirationClaim(expirationClaim, clockSkewInMilliseconds);

	}
909689
@Override
  public void validate () throws SchedulerException
  {
    super.validate ();

    if (m_eRepeatIntervalUnit == null ||
        !(m_eRepeatIntervalUnit.equals (EIntervalUnit.SECOND) ||
          m_eRepeatIntervalUnit.equals (EIntervalUnit.MINUTE) ||
          m_eRepeatIntervalUnit.equals (EIntervalUnit.HOUR)))
      throw new SchedulerException ("Invalid repeat IntervalUnit (must be SECOND, MINUTE or HOUR).");
    if (m_nRepeatInterval < 1)
    {
      throw new SchedulerException ("Repeat Interval cannot be zero.");
    }

    // Ensure interval does not exceed 24 hours
    final long secondsInHour = 24 * 60 * 60L;
    if (m_eRepeatIntervalUnit == EIntervalUnit.SECOND && m_nRepeatInterval > secondsInHour)
    {
      throw new SchedulerException ("repeatInterval can not exceed 24 hours (" +
                                    secondsInHour +
                                    " seconds). Given " +
                                    m_nRepeatInterval);
    }
    if (m_eRepeatIntervalUnit == EIntervalUnit.MINUTE && m_nRepeatInterval > secondsInHour / 60L)
    {
      throw new SchedulerException ("repeatInterval can not exceed 24 hours (" +
                                    secondsInHour / 60L +
                                    " minutes). Given " +
                                    m_nRepeatInterval);
    }
    if (m_eRepeatIntervalUnit == EIntervalUnit.HOUR && m_nRepeatInterval > 24)
    {
      throw new SchedulerException ("repeatInterval can not exceed 24 hours. Given " + m_nRepeatInterval + " hours.");
    }

    // Ensure timeOfDay is in order.
    if (getEndTimeOfDay () != null && !getStartTimeOfDay ().before (getEndTimeOfDay ()))
    {
      throw new SchedulerException ("StartTimeOfDay " +
                                    m_aStartTimeOfDay +
                                    " should not come after endTimeOfDay " +
                                    m_aEndTimeOfDay);
    }
  }
1079325
@Override
	public void check() throws JMSException
	{
		if (destinationType == null)
			throw new InvalidDescriptorException("Missing destination reference property : 'destinationType'");
		if (!destinationType.equals("queue") && !destinationType.equals("topic"))
			throw new InvalidDescriptorException("Destination reference property 'destinationType' should be one of : queue, topic");
		if (destinationName == null)
			throw new InvalidDescriptorException("Missing destination reference property : 'destinationName'");
	}
377629
@Override
    public void setTemporaryQueueNamePrefix(String prefix) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTemporaryQueueNamePrefix", prefix);

        if (prefix != null && !prefix.equals("")) {
            jcaManagedConnectionFactory.setTemporaryQueueNamePrefix(prefix);
        }
        else {
            jcaManagedConnectionFactory.setTemporaryQueueNamePrefix(null);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTemporaryQueueNamePrefix");
    }
482130
@Override
    public final void uncheckedSetReplyTimeToLive(Long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "uncheckedSetReplyTimeToLive", value);
        if (value != null) {
            getApi().setField(JsApiAccess.REPLYTIMETOLIVE_VALUE, value);
        }
        else {
            getApi().setChoiceField(JsApiAccess.REPLYTIMETOLIVE, JsApiAccess.IS_REPLYTIMETOLIVE_UNSET);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "uncheckedSetReplyTimeToLive");
    }
1215246
@Override
    public void validate() {
        if (value == null) {
            throw new NoValueGivenException(getPath());
        }

        if (valids.size() != 0) {
            boolean ok = false;
            String valString = (value != null) ? value.toString() : "";

            for (int i = 0; i < valids.size(); i++) {
                if (valids.get(i).equals(valString)) {
                    ok = true;
                    break;
                }
            }

            if (!ok) {
                throw new NoValidValueException(getPath(), valString);
            }
        }

        setValid(true);
    }
881272
def validation_accepts_or_updates_time?(validations_for_type)
      res = validations_for_type.each_with_object([]) do |validation, offsets|
        r = validation.validate(@time, @start_time)
        return true if r.nil? || r == 0
        offsets << r
      end
      shift_time_by_validation(res, validations_for_type.first)
      false
    end
532139
public synchronized void checkIfCreateNonPersistentTimerAllowed(EJBModuleMetaDataImpl mmd) {
        if (ivStopping) {
            throw new EJBStoppedException(ivName);
        }

        if (mmd != null && mmd.ivStopping) {
            throw new EJBStoppedException(mmd.getJ2EEName().toString());
        }
    }
546917
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSLong exporter_id_validator = new MPSLong();
		exporter_id_validator.validate(operationType, exporter_id, "\"exporter_id\"");
		
		MPSLong priority_validator = new MPSLong();
		priority_validator.validate(operationType, priority, "\"priority\"");
		
		MPSLong timestamp_validator = new MPSLong();
		timestamp_validator.validate(operationType, timestamp, "\"timestamp\"");
		
		MPSString hostname_validator = new MPSString();
		hostname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		hostname_validator.validate(operationType, hostname, "\"hostname\"");
		
		MPSString process_name_validator = new MPSString();
		process_name_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		process_name_validator.validate(operationType, process_name, "\"process_name\"");
		
		MPSString module_validator = new MPSString();
		module_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		module_validator.validate(operationType, module, "\"module\"");
		
		MPSString type_validator = new MPSString();
		type_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		type_validator.validate(operationType, type, "\"type\"");
		
		MPSString syslog_msg_validator = new MPSString();
		syslog_msg_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 2000);
		syslog_msg_validator.validate(operationType, syslog_msg, "\"syslog_msg\"");
		
		MPSLong sequence_no_validator = new MPSLong();
		sequence_no_validator.validate(operationType, sequence_no, "\"sequence_no\"");
		
		MPSLong datarecord_rx_time_validator = new MPSLong();
		datarecord_rx_time_validator.validate(operationType, datarecord_rx_time, "\"datarecord_rx_time\"");
		
		MPSBoolean decoded_validator = new MPSBoolean();
		decoded_validator.validate(operationType, decoded, "\"decoded\"");
		
		MPSString group_name_validator = new MPSString();
		group_name_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		group_name_validator.validate(operationType, group_name, "\"group_name\"");
		
		MPSString sessionId_validator = new MPSString();
		sessionId_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		sessionId_validator.validate(operationType, sessionId, "\"sessionId\"");
		
		MPSString username_validator = new MPSString();
		username_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		username_validator.validate(operationType, username, "\"username\"");
		
		MPSString clientip_validator = new MPSString();
		clientip_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		clientip_validator.validate(operationType, clientip, "\"clientip\"");
		
		MPSString vserverip_validator = new MPSString();
		vserverip_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		vserverip_validator.validate(operationType, vserverip, "\"vserverip\"");
		
		MPSString vserverport_validator = new MPSString();
		vserverport_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		vserverport_validator.validate(operationType, vserverport, "\"vserverport\"");
		
		MPSString nat_ip_validator = new MPSString();
		nat_ip_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		nat_ip_validator.validate(operationType, nat_ip, "\"nat_ip\"");
		
		MPSString sourceip_validator = new MPSString();
		sourceip_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		sourceip_validator.validate(operationType, sourceip, "\"sourceip\"");
		
		MPSString sourceport_validator = new MPSString();
		sourceport_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		sourceport_validator.validate(operationType, sourceport, "\"sourceport\"");
		
		MPSString destinationip_validator = new MPSString();
		destinationip_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		destinationip_validator.validate(operationType, destinationip, "\"destinationip\"");
		
		MPSString destinationport_validator = new MPSString();
		destinationport_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		destinationport_validator.validate(operationType, destinationport, "\"destinationport\"");
		
		MPSString starttime_validator = new MPSString();
		starttime_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		starttime_validator.validate(operationType, starttime, "\"starttime\"");
		
		MPSString endtime_validator = new MPSString();
		endtime_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		endtime_validator.validate(operationType, endtime, "\"endtime\"");
		
		MPSString duration_validator = new MPSString();
		duration_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		duration_validator.validate(operationType, duration, "\"duration\"");
		
		MPSString totalBytesSend_validator = new MPSString();
		totalBytesSend_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalBytesSend_validator.validate(operationType, totalBytesSend, "\"totalBytesSend\"");
		
		MPSString totalBytesRecv_validator = new MPSString();
		totalBytesRecv_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalBytesRecv_validator.validate(operationType, totalBytesRecv, "\"totalBytesRecv\"");
		
		MPSString totalCompressedBytesSend_validator = new MPSString();
		totalCompressedBytesSend_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalCompressedBytesSend_validator.validate(operationType, totalCompressedBytesSend, "\"totalCompressedBytesSend\"");
		
		MPSString totalCompressedBytesRecv_validator = new MPSString();
		totalCompressedBytesRecv_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalCompressedBytesRecv_validator.validate(operationType, totalCompressedBytesRecv, "\"totalCompressedBytesRecv\"");
		
		MPSString compressionRatioSend_validator = new MPSString();
		compressionRatioSend_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		compressionRatioSend_validator.validate(operationType, compressionRatioSend, "\"compressionRatioSend\"");
		
		MPSString compressionRatioRecv_validator = new MPSString();
		compressionRatioRecv_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		compressionRatioRecv_validator.validate(operationType, compressionRatioRecv, "\"compressionRatioRecv\"");
		
		MPSString domainname_validator = new MPSString();
		domainname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		domainname_validator.validate(operationType, domainname, "\"domainname\"");
		
		MPSString applicationName_validator = new MPSString();
		applicationName_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		applicationName_validator.validate(operationType, applicationName, "\"applicationName\"");
		
		MPSString browserType_validator = new MPSString();
		browserType_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		browserType_validator.validate(operationType, browserType, "\"browserType\"");
		
		MPSString clientType_validator = new MPSString();
		clientType_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		clientType_validator.validate(operationType, clientType, "\"clientType\"");
		
		MPSString logoutMethod_validator = new MPSString();
		logoutMethod_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		logoutMethod_validator.validate(operationType, logoutMethod, "\"logoutMethod\"");
		
		MPSString vpnaccess_validator = new MPSString();
		vpnaccess_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		vpnaccess_validator.validate(operationType, vpnaccess, "\"vpnaccess\"");
		
		MPSString deniedURL_validator = new MPSString();
		deniedURL_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		deniedURL_validator.validate(operationType, deniedURL, "\"deniedURL\"");
		
		MPSString deniedByPolicy_validator = new MPSString();
		deniedByPolicy_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		deniedByPolicy_validator.validate(operationType, deniedByPolicy, "\"deniedByPolicy\"");
		
		MPSString remote_host_validator = new MPSString();
		remote_host_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		remote_host_validator.validate(operationType, remote_host, "\"remote_host\"");
		
		MPSString xdatalen_validator = new MPSString();
		xdatalen_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		xdatalen_validator.validate(operationType, xdatalen, "\"xdatalen\"");
		
		MPSString xdata_validator = new MPSString();
		xdata_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		xdata_validator.validate(operationType, xdata, "\"xdata\"");
		
		MPSString last_contact_validator = new MPSString();
		last_contact_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		last_contact_validator.validate(operationType, last_contact, "\"last_contact\"");
		
		MPSString httpResourceName_validator = new MPSString();
		httpResourceName_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		httpResourceName_validator.validate(operationType, httpResourceName, "\"httpResourceName\"");
		
		MPSString licenselmt_validator = new MPSString();
		licenselmt_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		licenselmt_validator.validate(operationType, licenselmt, "\"licenselmt\"");
		
		MPSString connectionId_validator = new MPSString();
		connectionId_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		connectionId_validator.validate(operationType, connectionId, "\"connectionId\"");
		
		MPSString clisecexp_validator = new MPSString();
		clisecexp_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		clisecexp_validator.validate(operationType, clisecexp, "\"clisecexp\"");
		
		MPSString eval_value_validator = new MPSString();
		eval_value_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		eval_value_validator.validate(operationType, eval_value, "\"eval_value\"");
		
		MPSString httpResourcesAccessed_validator = new MPSString();
		httpResourcesAccessed_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		httpResourcesAccessed_validator.validate(operationType, httpResourcesAccessed, "\"httpResourcesAccessed\"");
		
		MPSString nonhttpServicesAccessed_validator = new MPSString();
		nonhttpServicesAccessed_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		nonhttpServicesAccessed_validator.validate(operationType, nonhttpServicesAccessed, "\"nonhttpServicesAccessed\"");
		
		MPSString totalTCPconnections_validator = new MPSString();
		totalTCPconnections_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalTCPconnections_validator.validate(operationType, totalTCPconnections, "\"totalTCPconnections\"");
		
		MPSString totalUDPflows_validator = new MPSString();
		totalUDPflows_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalUDPflows_validator.validate(operationType, totalUDPflows, "\"totalUDPflows\"");
		
		MPSString totalPoliciesAllowed_validator = new MPSString();
		totalPoliciesAllowed_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalPoliciesAllowed_validator.validate(operationType, totalPoliciesAllowed, "\"totalPoliciesAllowed\"");
		
		MPSString totalPoliciesDenied_validator = new MPSString();
		totalPoliciesDenied_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 255);
		totalPoliciesDenied_validator.validate(operationType, totalPoliciesDenied, "\"totalPoliciesDenied\"");
		
		MPSString id_validator = new MPSString();
		id_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);
		id_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);
		id_validator.validate(operationType, id, "\"id\"");
		
	}
891184
public final void setRemainingTimeToLive(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setRemainingTimeToLive", Long.valueOf(value));
        if (value < 0) {
            getHdr2().setLongField(JsHdr2Access.TIMETOLIVE, 0);
        }
        else if (value == 0) {
            getHdr2().setLongField(JsHdr2Access.TIMETOLIVE, 1);
        }
        else {
            long ttl = getMessageWaitTime().longValue() + value;
            /* Call setTimeToLive so that bounds checking takes place for an API message. */
            setTimeToLive(ttl);
        }
        wasTimeToLiveChanged = true;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setRemainingTimeToLive");
    }
1296460
public void addTimexAnnotation(String timexType, int begin, int end, Sentence sentence, String timexValue, String timexQuant,
			String timexFreq, String timexMod, String emptyValue, String timexId, String foundByRule, JCas jcas) {
		
		Timex3 annotation = new Timex3(jcas);
		annotation.setBegin(begin);
		annotation.setEnd(end);

		annotation.setFilename(sentence.getFilename());
		annotation.setSentId(sentence.getSentenceId());
		
		annotation.setEmptyValue(emptyValue);

		FSIterator iterToken = jcas.getAnnotationIndex(Token.type).subiterator(sentence);
		String allTokIds = "";
		while (iterToken.hasNext()) {
			Token tok = (Token) iterToken.next();
			if (tok.getBegin() <= begin && tok.getEnd() > begin) {
				annotation.setFirstTokId(tok.getTokenId());
				allTokIds = "BEGIN<-->" + tok.getTokenId();
			}
			if ((tok.getBegin() > begin) && (tok.getEnd() <= end)) {
				allTokIds = allTokIds + "<-->" + tok.getTokenId();
			}
		}
		annotation.setAllTokIds(allTokIds);
		annotation.setTimexType(timexType);
		annotation.setTimexValue(timexValue);
		annotation.setTimexId(timexId);
		annotation.setFoundByRule(foundByRule);
		if ((timexType.equals("DATE")) || (timexType.equals("TIME"))) {
			if ((timexValue.startsWith("X")) || (timexValue.startsWith("UNDEF"))) {
				annotation.setFoundByRule(foundByRule+"-relative");
			} else {
				annotation.setFoundByRule(foundByRule+"-explicit");
			}
		}
		if (!(timexQuant == null)) {
			annotation.setTimexQuant(timexQuant);
		}
		if (!(timexFreq == null)) {
			annotation.setTimexFreq(timexFreq);
		}
		if (!(timexMod == null)) {
			annotation.setTimexMod(timexMod);
		}
		annotation.addToIndexes();
		this.timex_counter++;
		
		Logger.printDetail(annotation.getTimexId()+"EXTRACTION PHASE:   "+" found by:"+annotation.getFoundByRule()+" text:"+annotation.getCoveredText());
		Logger.printDetail(annotation.getTimexId()+"NORMALIZATION PHASE:"+" found by:"+annotation.getFoundByRule()+" text:"+annotation.getCoveredText()+" value:"+annotation.getTimexValue());
		
	}
1223692
public final void setCurrentMEArrivalTimestamp(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setCurrentMEArrivalTimestamp", Long.valueOf(value));
        jmo.setLongField(JsHdrAccess.ARRIVALTIMESTAMP, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setCurrentMEArrivalTimestamp");
    }
242731
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString timezone_validator = new MPSString();
		timezone_validator.validate(operationType, timezone, "\"timezone\"");
		
	}
30932
@Override
    public void onValueSelected(Timepoint newValue) {
        setHour(newValue.getHour(), false);
        mTimePicker.setContentDescription(mHourPickerDescription + ": " + newValue.getHour());
        setMinute(newValue.getMinute());
        mTimePicker.setContentDescription(mMinutePickerDescription + ": " + newValue.getMinute());
        setSecond(newValue.getSecond());
        mTimePicker.setContentDescription(mSecondPickerDescription + ": " + newValue.getSecond());
        if(!mIs24HourMode) updateAmPmDisplay(newValue.isAM() ? AM : PM);
    }
313339
@Override
    public final void setReplyTimeToLive(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setReplyTimeToLive", Long.valueOf(value));
        if ((value >= MfpConstants.MIN_TIME_TO_LIVE) && (value <= MfpConstants.MAX_TIME_TO_LIVE)) {
            getApi().setLongField(JsApiAccess.REPLYTIMETOLIVE_VALUE, value);
        }
        else {
            IllegalArgumentException e = new IllegalArgumentException(Long.toString(value));
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setReplyTimeToLive", e);
            throw e;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setReplyTimeToLive");
    }
572903
@Override
    public void validate() throws InvalidPropertyException {

        final String methodName = "validate";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        final List<String> failedPropsMessages = new ArrayList<String>();

        try {
            final List<PropertyDescriptor> invalidProperties = new ArrayList<PropertyDescriptor>();

            // Busname is required
            if ((null == _busName) || ("".equals(_busName))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE, "Invalid BusName - BusName was "
                                             + _busName);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_BUSNAME_CWSJR1187"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("busName",
                                JmsJcaActivationSpec.class));
            }

            // Destination required
            if (null == _destination) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Destination - Destination was null");
                }
                failedPropsMessages.add(NLS.getFormattedMessage("INVALID_PROPERTY_DESTINATION_CWSJR1188", null, null));
                invalidProperties.add(new PropertyDescriptor("destination",
                                JmsJcaActivationSpec.class));
            }

            // Check destination type valid
            if (!(QUEUE.equals(_destinationType) || TOPIC
                            .equals(_destinationType))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Destination Type - We expected a destination type of "
                                                + QUEUE + " or " + TOPIC + " but we got "
                                                + _destinationType);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_DESTINATION_TYPE_CWSJR1189"),
                                                                new Object[] { QUEUE, TOPIC, _destinationType }, null));
                invalidProperties.add(new PropertyDescriptor("destinationType",
                                JmsJcaActivationSpec.class));
            }

            // Check acknowledge mode valid
            if (!(AUTO_ACKNOWLEDGE.equals(_acknowledgeMode) || DUPS_OK_ACKNOWLEDGE
                            .equals(_acknowledgeMode))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Acknowledge Mode - We expected an acknowledge mode of "
                                                + AUTO_ACKNOWLEDGE + " or "
                                                + DUPS_OK_ACKNOWLEDGE + " but we got "
                                                + _acknowledgeMode);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_ACKNOWLEDGE_MODE_CWSJR1190"),
                                                                new Object[] { AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, _acknowledgeMode },
                                                                null));
                invalidProperties.add(new PropertyDescriptor("acknowledgeMode",
                                JmsJcaActivationSpec.class));
            }

            // Check read ahead valid
            if (!(ApiJmsConstants.READ_AHEAD_DEFAULT.equals(_readAhead)
                  || ApiJmsConstants.READ_AHEAD_ON.equals(_readAhead) || ApiJmsConstants.READ_AHEAD_OFF
                            .equals(_readAhead))) {

                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid ReadAhead - We expected a read ahead of "
                                                + ApiJmsConstants.READ_AHEAD_DEFAULT + ", "
                                                + ApiJmsConstants.READ_AHEAD_ON + " or "
                                                + ApiJmsConstants.READ_AHEAD_OFF
                                                + " but we got " + _readAhead);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_READ_AHEAD_CWSJR1191"),
                                                                new Object[] { ApiJmsConstants.READ_AHEAD_DEFAULT,
                                                                              ApiJmsConstants.READ_AHEAD_ON,
                                                                              ApiJmsConstants.READ_AHEAD_OFF,
                                                                              _acknowledgeMode },
                                                                null));
                invalidProperties.add(new PropertyDescriptor("readAhead",
                                JmsJcaActivationSpec.class));
            }

            // For queues ...
            if (QUEUE.equals(_destinationType)) {
                if (!(_destination instanceof JmsQueue)) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid Destination - We expect a destination object to be a "
                                                    + JmsQueue.class.getName()
                                                    + " but we got "
                                                    + _destination == null ? "null" : _destination.getClass().getName());
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_QUEUE_CWSJR1192"),
                                                                    new Object[] { JmsQueue.class.getName(), _destination == null ? "null" : _destination.getClass().getName() },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor("destination",
                                    JmsJcaActivationSpec.class));
                }
            }

            // For topics ...
            if (TOPIC.equals(_destinationType)) {

                if (!(_destination instanceof JmsTopic)) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid Destination - We expect a destination object to be a "
                                                    + JmsTopic.class.getName()
                                                    + " but we got "
                                                    + _destination == null ? "null" : _destination.getClass().getName());
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TOPIC_CWSJR1193"),
                                                                    new Object[] { JmsTopic.class.getName(), _destination == null ? "null" : _destination.getClass().getName() },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor("destination",
                                    JmsJcaActivationSpec.class));
                }

                // ... check subscription durability valid
                if (!(DURABLE.equals(_subscriptionDurability) || DURABLE_SHARED.equals(_subscriptionDurability) ||
                      NON_DURABLE.equals(_subscriptionDurability) || NON_DURABLE_SHARED.equals(_subscriptionDurability))) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid subscriptionDurability - We expect a value of "
                                                    + DURABLE + " or " + DURABLE_SHARED + " or " + NON_DURABLE + " or " + NON_DURABLE_SHARED
                                                    + " but we got "
                                                    + _subscriptionDurability);
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SUBDUR_CWSJR1194"),
                                                                    new Object[] { DURABLE, DURABLE_SHARED, NON_DURABLE, NON_DURABLE_SHARED, _subscriptionDurability },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "subscriptionDurability",
                                    JmsJcaActivationSpec.class));
                }

                if (DURABLE.equals(_subscriptionDurability)) {
                    // ... check client ID set
                    if ((null == _clientId) || ("".equals(_clientId))) {
                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_CLIENTID_CWSJR1183"),
                                                                        null, null));
                        invalidProperties.add(new PropertyDescriptor(
                                        "clientId", JmsJcaActivationSpec.class));
                    }

                }
                // For durable(and shared non durable) topic subscriptions ...
                if (DURABLE.equals(_subscriptionDurability) ||
                    DURABLE_SHARED.equals(_subscriptionDurability) ||
                    NON_DURABLE_SHARED.equals(_subscriptionDurability)) {
                    // ... check client ID set
                    if ((null == _clientId) || ("".equals(_clientId))) {
                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_CLIENTID_CWSJR1183"),
                                                                        null, null));
                        invalidProperties.add(new PropertyDescriptor(
                                        "clientId", JmsJcaActivationSpec.class));
                    }

                    // durableSubscriptionHome is populated at the connectionImpl 
                    // or the ConnectionProxy for liberty.Hence the check is removed

                    // ... check subscription name set
                    if ((null == _subscriptionName)
                        || ("".equals(_subscriptionName))) {

                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SUBNAME_CWSJR1196"),
                                                                        null, null));
                        invalidProperties
                                        .add(new PropertyDescriptor("subscriptionName",
                                                        JmsJcaActivationSpec.class));

                    }

                }
            }

            // Check maximum concurrency greater than zero
            if ((null == _maxConcurrency) || (_maxConcurrency.intValue() < 1)) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_MAXCONC_CWSJR1198"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("maxConcurrency",
                                JmsJcaActivationSpec.class));
            }

            // Check maximum batch size greater than zero
            if ((null == _maxBatchSize) || (_maxBatchSize.intValue() < 1)) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_MAXBATCH_CWSJR1199"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("maxBatchSize",
                                JmsJcaActivationSpec.class));
            }

            // Check share data source with CMP is set - since this defaults to a value at
            // initialisation time this should never be encountered
            if (null == _shareDataSourceWithCMP) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SHARECMP_CWSJR1200"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor(
                                "shareDataSourceWithCMP", JmsJcaActivationSpec.class));
            }

            /**
             * For the target set of properties, use the defaults if none specified
             */
            if ("".equals(_target)) {

                _target = JmsraConstants.DEFAULT_TARGET;

            }

            // Target type must be one of the predefined values
            if ((null == _targetType) || ("".equals(_targetType))) {

                _targetType = JmsraConstants.DEFAULT_TARGET_TYPE;

            } else {

                if (!((ApiJmsConstants.TARGET_TYPE_BUSMEMBER.equals(_targetType)) ||
                      (ApiJmsConstants.TARGET_TYPE_ME.equals(_targetType)) || (ApiJmsConstants.TARGET_TYPE_CUSTOM.equals(_targetType)))) {

                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TARGET_TYPE_CWSJR1180"),
                                                                    new Object[] { ApiJmsConstants.TARGET_TYPE_BUSMEMBER,
                                                                                  ApiJmsConstants.TARGET_TYPE_ME,
                                                                                  ApiJmsConstants.TARGET_TYPE_CUSTOM,
                                                                                  _targetType },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "targetType",
                                    JmsJcaActivationSpec.class));

                }

            }

            // Target significance must be one of the predefined values
            if ((null == _targetSignificance) || ("".equals(_targetSignificance))) {

                _targetSignificance = JmsraConstants.DEFAULT_TARGET_SIGNIFICANCE;

            } else {

                if (!((ApiJmsConstants.TARGET_SIGNIFICANCE_PREFERRED.equals(_targetSignificance)) || (ApiJmsConstants.TARGET_SIGNIFICANCE_REQUIRED.equals(_targetSignificance)))) {

                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TARGET_SIGNIFICANCE_CWSJR1179"),
                                                                    new Object[] { ApiJmsConstants.TARGET_SIGNIFICANCE_PREFERRED,
                                                                                  ApiJmsConstants.TARGET_SIGNIFICANCE_REQUIRED,
                                                                                  _targetSignificance },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "targetSignificance",
                                    JmsJcaActivationSpec.class));

                }

            }

            // If we have any invalid properties, throw an
            // InvalidPropertyException
            if (!invalidProperties.isEmpty()) {

                final PropertyDescriptor[] invalidPropertyArray = invalidProperties
                                .toArray(new PropertyDescriptor[invalidProperties
                                                .size()]);
                // Commented out in 284561 since we are now using failedPropsMessages instead
/*
 * final List propertyNames = new ArrayList();
 * 
 * for (int i = 0; i < invalidPropertyArray.length; i++) {
 * propertyNames.add(invalidPropertyArray[i].getDisplayName());
 * }
 */

                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE, "Invalid properties found:",
                                failedPropsMessages);
                }

                final InvalidPropertyException exc = new InvalidPropertyException(
                                NLS.getFormattedMessage(
                                                        ("INVALID_PROPERTIES_CWSJR1181"),
                                                        new Object[] { failedPropsMessages }, null));
                exc.setInvalidPropertyDescriptors(invalidPropertyArray);
                throw exc;
            }

        } catch (final IntrospectionException exception) {

            FFDCFilter.processException(exception, CLASS_NAME + "."
                                                   + methodName, FFDC_PROBE_1, this);

            SibTr.exception(this, TRACE, exception);

            throw new RuntimeException(NLS.getFormattedMessage(
                                                               ("EXCEPTION_RECEIVED_CWSJR1185"),
                                                               new Object[] { exception }, null), exception);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }