QueueSender.send (BytesMessage) is sending TextMessage

Hi,

I am facing a peculiar problem, i am using the following code sinppet to send BytesMessage to an MDB. This MDB is configured in WSAD 5.1 to an MQSeries Queue which is configured using "Websphere MQ JMS Provider" through admin console.

BytesMessage bytesMessage = queueSession.createBytesMessage();

bytesMessage.writeBytes(message.getBytes());

queueSender.send(bytesMessage);

In the MDB i am receiving the message in onMessage method but when i print the class name of the message it is showing as com.ibm.jms.JMSTextMessage. It should have been com.ibm.jms.JMSBytesMessage isn't it?

For your additional information here is the complete message description:

JMS Message class:jms_text

JMSType: null

JMSDeliveryMode: 1

JMSExpiration:0

JMSPriority:0

JMSMessageID:ID:414d5120514d5f4859443434202020205267c84520003401

JMSTimestamp:1170845975680

JMSCorrelationID:null

JMSDestination: null

JMSReplyTo:null

JMSRedelivered: true

JMS_IBM_PutDate:20070207

JMSXAppID:Websphere MQ Client for Java

JMS_IBM_Format:MQSTR

JMS_IBM_PutApplType:28

JMS_IBM_MsgType:8

JMSXUserID:MUSR_MQADMIN

JMS_IBM_PutTime:10593568

JMSXDeliveryCount:2

Can anyone help me in sending the BytesMessage to an MDB, what I am missing.

Thanks in advance.

Message was edited by:

Rammohan_Yadavalli

[1465 byte] By [Rammohan_Yadavallia] at [2007-11-26 17:37:18]
# 1
Hi Everyone,I solved this by myself, i am using MQ API to post messages, instead i should have used JMS api to send BytesMessage
Rammohan_Yadavallia at 2007-7-9 0:05:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...