ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS / MQ Mapping

Post new topic  Reply to topic
 JMS / MQ Mapping « View previous topic :: View next topic » 
Author Message
mreategu
PostPosted: Wed May 29, 2002 2:03 pm    Post subject: JMS / MQ Mapping Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS / MQ Mapping
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.