send

 

public void send(Destination destination, Message message) 
              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 uses the message producer's default delivery mode, default priority, and default message lifetime. Typically, you specify a destination when you create a message producer but, if you do not, specify a destination every time you send a message.

Parameters

  • destination - the message destination.

  • message - the message to send.

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_E_INTERNAL_ERROR

    • MQJMS_EXCEPTION_PUT_MSG_FAILED

    • MQJMS_MESSAGEPRODUCER_CLOSED


uj29490_