setJMSCorrelationIDAsBytes

 

public void setJMSCorrelationIDAsBytes(byte[] correlID) 
              throws JMSException;

Sets the correlation ID as an array of bytes for the message.

If a provider supports the native concept of correlation id, a JMS client might need to assign specific JMSCorrelationID values to match those expected by non-JMS clients. JMS providers without native correlation ID values are not required to support this (and the corresponding get) method and the corresponding get method Their implementation might throw java.lang.UnsupportedOperationException.

A client can use this call to set the correlationID either to a messageID from a previous message, or to an application-specific string. Application-specific strings must not start with the characters 'ID:'.

The use of a byte[] value for JMSCorrelationID is not portable.

Parameters

  • correlID - the correlation ID value as an array of bytes.

Exceptions

  • JMSException - if an internal error occurs

  • IndexOutOfBoundsException - if copying would cause access to data outside array bounds.

  • ArrayStoreException - if an element in the source array cannot be stored into the destination array because of a type mismatch.

  • NullPointerException - if either source or destination is null.


uj26730_