I am trying to use either MDB or MessageListener interface to "listen" to an IBM Websphere MQ Queue, so that any need messages arrive will be picked up and proccessed.



It looks to me that when message is greater than 4M, the message was was segmentated. The MDB get mutliple message got mutilple messages instead of a complete one.



Here is my client side code which send MQMessage.

(4*1024*1024))

{

mqMessage.messageFlags = MQC.MQMF_SEGMENTATION_ALLOWED;

}



...

// serialize the whole Message object as an XML stream so all of its

// attributes will be available to the receiver

byte[] messageAsByteArray = messageParser.serializeMessageAsByteArray(message) ;


// MQSI team wanted this in the format field.

mqMessage.format = MQC.MQFMT_STRING;

mqMessage.write(messageAsByteArray);

mqQueue.put(mqMessage, pmo);





And here is the MDB server config:




ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd



a2aserver





TestMDBBean

ejbs.TestMDBBean

javax.jms.MessageListener

Container

javax.jms.Queue









How can I set MDB configure to get completed message?



Thank you very much for any help.



Mei