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 » MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM

Post new topic  Reply to topic
 MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM « View previous topic :: View next topic » 
Author Message
DaeMoohn
PostPosted: Thu Jun 17, 2010 10:18 pm    Post subject: MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM Reply with quote

Apprentice

Joined: 04 Jun 2010
Posts: 26

Good morning,

Our server side partners want us to modify the MQMD fields JMS_IBM_MQMD_REPLYTOQMGR and JMS_IBM_MQMD_REPLYTOQ on the messages we are placing on the queues. The problem is that we cannot set them. Although ia9h pdf states "By default
access to MQMD is disabled and must be enabled explicitly by the application
using Destination properties XMSC_WMQ_MQMD_WRITE_ENABLED and
XMSC_WMQ_MQMD_READ_ENABLED", and we set on the queue the XMSC_WMQ_MQMD_WRITE_ENABLE boolean property to true, every time I try to set those MQMD fields, I am getting thrown an error stating those fields are readonly. I cannot use the XMS field ReplyTo because the JMS_IBM_MQMD_REPLYTOQMGR value doesn't reference a valid queue manager (it's some hint for the server side, or something). Can you please provide me with an example, a hint, anything?
Thanks a lot.
Back to top
View user's profile Send private message
calanais
PostPosted: Fri Jun 18, 2010 1:05 am    Post subject: Reply with quote

Apprentice

Joined: 12 Mar 2010
Posts: 32

Sounds like you could setting those fields after the message has been sent or the message as been set as readonly..

Double check when you are setting the fields.

Check the WMQ JMS Samples as well - there are some examples there of using this functionality.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 18, 2010 1:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You shouldn''t need to set these fields directly. You should be able to set them as properties of the Destination object, without treating them as MQMD properties.
Back to top
View user's profile Send private message
DaeMoohn
PostPosted: Fri Jun 18, 2010 1:40 am    Post subject: Reply with quote

Apprentice

Joined: 04 Jun 2010
Posts: 26

Here is a part of the code:

XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "remotemq");
connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, "saasa");
connectionFactory.SetIntProperty(XMSC.WMQ_PORT, 1414);
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "sasa");
connection = connectionFactory.CreateConnection();
connection.ExceptionListener = new ExceptionListener(OnException);
ISession session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
IDestination queue = session.CreateQueue("queue://qm/queue");
***here i would set the property of XMSC_WMQ_MQMD_WRITE_ENABLED ***
***then i would try to set the two properties***
IMessageProducer producer = session.CreateProducer(queue);
connection.Start();

That is the code.

To respond to mqjeff: You are reffering to "ReplyTo" property of te IDestination. I cannot use that because the other side wants to have "<none>" specified on the reply to queue manager. There is no need to tell you that is not the name of the queue manager I am working with. To give you a broader view:

We are using a remote queue manager. The queues where I write are remoted from a foreign server. The queue from where I read are local, and the foreign server writes on them. So if I set the ReplyTo property, they will see there a server they cannot touch (local server, not foreign server). I don't know how to set the queue manager to that particular string. Also, I don't think I can create a mock queue manager object to which to connect with the correct queue name. Using IBM MQ Classes for .NET, I was able to use
mqmessage.ReplyToQueueManagerName = "<none>";
mqmessage.ReplyToQueueName = InputQueue;
I am searching for an equivalent in XMS.
I do understand your argument that what I am wasking for isn't supposed
to happen, but that's the current situation/requirement.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 18, 2010 1:38 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You are going about it the wrong way.
you need to do something like:

Code:
Queue myreplytoDestination = mysession.createQueue("queue://QMGR/QUEUE");
requestmsg.setReplyToDestination=myreplytoDestination;


Note that if you leave the qmgr blank (queue:///queuename) the queue manager you are connected to gets automatically filled in.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
DaeMoohn
PostPosted: Sun Jun 20, 2010 9:58 am    Post subject: Reply with quote

Apprentice

Joined: 04 Jun 2010
Posts: 26

Thanks, I'll try that monday.
Never crossed my mind!
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 » MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM
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.