Have you seen the following exception when you run your application in Websphere application server?
“CWSIA0114E: The property JMS_IBM_MsgType should be set
using type java.lang.Integer, not java.lang.String.”
I do have such a problem. Why?
As we know JMS messages are composed of three pars on the JMS specification:
- Header
- Properties
- Body
Among them, Properties include Application-specific properties,Standard properties and Provider-specific properties.
Websphere MQ messages are composed of three parts:
- MQ Message Descriptor (MQMD)
- MQ MQRFH2 Header
- Body
From JMS message to MQ message or from MQ message to JMS message, the transformation is required. The transformation model is defined below:

The transformation is done in two approaches:
Mapping – where the MQMD includes a field that is equivalent to the JMS field, the JMS field is mapped onto the MQMD field. Additional MQMD fields are exposed as JMS properties, as a JMS application may need to get or set these fields when communicating with a non-JMS application.
Copying – where there is no MQMD equivalent, a JMS header field or property is passed, possibly transformed, as a field inside the MQRFH2.
In this case, mapping is not correct. The MQ specific property JMS_IBM_MsgType is integer type and has to be set as
JMSMessage.setIntProperty(“ JMS_IBM_MsgType”,some-valid-value)
In a message pass through use case, we need to copy inbound message properties to outbound message properties, we can check if inbound message is websphere message type using following approach:
if(inboundJMSMessage.getClass().getName().startsWith(" com.ibm.jms.JMS") ||
inboundMessage.getClass().getName().startsWith(" com.ibm.ws.sib.api.jms.impl.Jms"))
{
// do mapping and copying
}
More about Mapping JMS messages onto WebSphere MQ messages, refer to
http://www-306.ibm.com/software/integration/mqfamily/library/manualsa/csqzaw04/csqzaw2r.htm
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/csqzaw1481.htm