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 » Copy message retains report setting

Post new topic  Reply to topic
 Copy message retains report setting « View previous topic :: View next topic » 
Author Message
jkoconnell
PostPosted: Mon Nov 15, 2010 10:57 am    Post subject: Copy message retains report setting Reply with quote

Newbie

Joined: 24 Feb 2005
Posts: 8

I am copying a message from inputQ to forwardQ using native Java. Very straightforward. Open inputQ and get message with MQC.MQOO_PASS_ALL_CONTEXT;

Put to forwardQ

int forwardQoptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING;
forwardQoptions |= MQC.MQOO_PASS_ALL_CONTEXT;
forwardQ = qMgr.accessQueue(sForwardQueue, forwardQoptions, null, null, null);
MQPutMessageOptions forwardPMO = new MQPutMessageOptions();
forwardPMO.options = MQC.MQPMO_SYNCPOINT;
forwardPMO.options |= MQC.MQPMO_PASS_ALL_CONTEXT;
forwardPMO.contextReference = inputQ;
forwardQ.put(inputMessage, forwardPMO);

However, the report options of the original message are being copied to the forwardQ message. The forwardQ is a remoteQ that has no relation to the sender of the inputQ message, so the COA request causes a problem.

How do I clear the report options when putting the message on forwardQ?

I tried adding

forwardPMO.options |= MQC.MQRO_NONE;

before the put, but it did not make a difference.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Nov 15, 2010 11:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So the PMO only controls what fields in the MQMD are writeable and/or are reset when you Put.

If you want to alter the contents of the MQMD, including the Report field, you need to alter the MQMD.
Back to top
View user's profile Send private message
jkoconnell
PostPosted: Mon Nov 15, 2010 12:19 pm    Post subject: Reply with quote

Newbie

Joined: 24 Feb 2005
Posts: 8

Thanks, I thought I tried this but must have had an error.

inputMessage.report = MQC.MQRO_NONE;

right before

forwardQ.put(inputMessage, forwardPMO);

That fixed it.
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 » Copy message retains report setting
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.