|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS / MQ Mapping |
« View previous topic :: View next topic » |
Author |
Message
|
mreategu |
Posted: Wed May 29, 2002 2:03 pm Post subject: JMS / MQ Mapping |
|
|
Newbie
Joined: 29 May 2002 Posts: 1
|
Hi,
I am new on this subject, have a project deadline coming and I can't find a solution for this problem.
Originally I had this code, it worked fine....
MQMessage sendMessage = new MQMessage() ;
MQPutMessageOptions pmo = new MQPutMessageOptions() ;
pmo.options = MQC.MQPMO_SET_IDENTITY_CONTEXT | MQC.MQPMO_FAIL_IF_QUIESCING ;
sendMessage.replyToQueueName = replyQueueNameMem ;
sendMessage.replyToQueueManagerName = queueManagerNameMem ;
sendMessage.format = MQC.MQFMT_STRING ;
sendMessage.expiry = 6000 ; // never expire
sendMessage.persistence = MQC.MQPER_NOT_PERSISTENT ;
sendMessage.messageId = MQC.MQMI_NONE ;
sendMessage.correlationId = pCorrId; // where pCorrId is the
//try-catch removed
sendMessage.writeString(InArg) ;
then, we changed to JMS. now, I can't get the right mapping on the Reply Queue! I am reading from a .bindings file but even as I change the value there and I see it in the 'watches' of my IDE, when it's posted on the queue it is different!
I am using the following options for the reply_q:
q_Reply.setPersistence(JMSC.MQJMS_PER_PER);//persistence
q_Reply.setPriority(1); //1
q_Reply.setExpiry(0); //unlimited
q_Reply.setTargetClient(1);//MQ target
q_Reply.setCCSID(546);
and the following options to send it
QueueConnection conn = qcf.createQueueConnection();
QueueSession session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = session.createSender(reply_q);
queueSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
queueSender.setPriority(1);
TextMessage outMessage = session.createTextMessage(SMBJMSMessage.getData());
outMessage.setJMSMessageID("");
outMessage.setJMSCorrelationIDAsBytes(msg.getJMSMessageID().getBytes());//where msg is the original request
queueSender.send(outMessage);
Apart from the different mapping, one annoying thing is as you see I am setting the message body but when I see the queue it has the content : "RFH "
Any help, suggestion, orientation or comment will be greatly appreciatted...
Thanks |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|