send
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException;
Sends a message to a destination if you are using a message producer for which no destination was specified when the message producer was created. The method specifies a delivery mode, a priority, and message lifetime. Typically, you specify a destination when you create a message producer but, if do not, specify a destination every time you send a message.
- Parameters
- destination - the destination to which to send the message.
- message - the message to send.
- deliveryMode - the delivery mode to use
- priority - the priority for the message
- timeToLive - the lifetime of the message in milliseconds
- Exceptions
- JMSException - with one of the following reasons:
- MQJMS_PUBLISHER_CLOSED
- MQJMS_E_IDENT_PRO_INVALID_OP
- MQJMS_EXCEPTION_MQ_NULL_Q
- MQJMS_EXCEPTION_MQ_Q_OPEN_FAILED
- MQJMS_E_SESSION_ASYNC
- MQJMS_PS_PUBLISH_MSG_FAILED
- MQJMS_EXCEPTION_INVALID_DESTINATION
- MQJMS_EXCEPTION_BAD_VALUE
- MQJMS_E_UNKNOWN_TARGET_CLIENT
- MQJMS_PS_PUBLISH_MSG_BUILD
- MQJMS_EXCEPTION_MSG_CREATE_ERROR
- MQJMS_ERR_QSENDER_CLOSED
- MQJMS_E_SESSION_CLOSED
- MQJMS_E_UNIDENT_PRO_INVALID_OP
- MQJMS_EXCEPTION_MQ_Q_CLOSE_FAILED
- MQRC_Q_TYPE_ERROR
- MQJMS_EXCEPTION_BAD_VALUE
- MQJMS_E_INTERNAL_ERROR
- MQJMS_EXCEPTION_PUT_MSG_FAILED
uj29500_