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 API Support » SETing value for "applicationIdData" filed.......

Post new topic  Reply to topic
 SETing value for "applicationIdData" filed....... « View previous topic :: View next topic » 
Author Message
jgorusu
PostPosted: Fri Sep 07, 2001 9:04 am    Post subject: Reply with quote

Newbie

Joined: 06 Sep 2001
Posts: 1

Greetings Everybody,

I'm not able to set value for MQMD field "applicationIdData".

I tried like this:

String messageId = "Some MessageId";
hello_world.messageId = messageId.getBytes();
//above two line works fine

String correlationId = "Some CorrelationId";
hello_world.correlationId = CorrelationId.getBytes();
//above two line works fine

String appIdData = "Some AppID";
hello_world.applicationIdData = appIdData;
//ABOVE TWO LINES NOT WORKING. I'M NOT GETTING ANY MQ ERROR OR JAVA ERROR AND SIMPLY THE applicationIdData filed not taking the value.


Is there any way to set this value in Java Program.

My Environment is:
JDK 1.2.2
MQS v5.2, NT

Ideas or suggestions please....
Thanks in advance
Jany





[ This Message was edited by: jgorusu on 2001-09-07 11:01 ]

[ This Message was edited by: jgorusu on 2001-09-07 11:02 ]
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Sun Sep 09, 2001 3:17 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi:

First a little background. MQSeries context data is broken into 2 groups: Origin Context and Identity Context.

ApplicationIdData belongs to the Identity Context group. Therefore, you have a choice of options: use either "Set Identity Context Option" or "Set All Context Option".

Since all you are after is the ApplicationIdData, then I would just set Identity Conext option.

Now, back to the present. When you set context, you MUST specify the option when you open the queue and ALSO when you do the put.

Do the following for the open:

int openOptions=MQC.MQOO_SET_IDENTITY_CONTEXT;

and on the put do the following:

MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo = pmo + MQC.MQPMO_SET_IDENTITY_CONTEXT;

Hope that helps.

later
Roger...
Back to top
View user's profile Send private message Visit poster's website
chanduy9
PostPosted: Mon Jan 28, 2002 5:06 pm    Post subject: Reply with quote

Disciple

Joined: 28 Nov 2001
Posts: 177
Location: USA

Hi,
Any luck...if so please let me know....i strucked at the same point.
Thanks in advance,
Chandra.
Back to top
View user's profile Send private message
andystone
PostPosted: Wed Jul 24, 2002 5:33 am    Post subject: Reply with quote

Newbie

Joined: 18 Jun 2002
Posts: 8
Location: Surrey, UK

I've just had this problem, and found Roger's response above very helpful.

However, there's a typo - on the PUT, you need to do the following:
Code:
pmo.options = MQC.MQPMO_SET_IDENTITY_CONTEXT;


My code is now successfully passing/receiving identity context data.
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 API Support » SETing value for "applicationIdData" filed.......
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.