Example usage for javax.jms MapMessage setIntProperty

List of usage examples for javax.jms MapMessage setIntProperty

Introduction

In this page you can find the example usage for javax.jms MapMessage setIntProperty.

Prototype


void setIntProperty(String name, int value) throws JMSException;

Source Link

Document

Sets an int property value with the specified name into the message.

Usage

From source file:com.appdynamicspilot.jms.MessageProducer.java

/**
 * Send message to for email to user by given orderid
 *///from w  w  w.j a v a 2  s  .  c  om
public void sendMessageWithOrderId(final String orderId, final String emailId) {
    getJmsTemplate().send(new MessageCreator() {
        public Message createMessage(Session session) throws JMSException {
            MapMessage msg = session.createMapMessage();
            msg.setString(COMMAND, CMD_MAIL);
            msg.setString(EMAIL_ID, emailId);
            msg.setString(ORDER_ID, orderId);
            msg.setIntProperty("testproperty", 21);
            return msg;
        }
    });
}