|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SETing value for "applicationIdData" filed....... |
« View previous topic :: View next topic » |
Author |
Message
|
jgorusu |
Posted: Fri Sep 07, 2001 9:04 am Post subject: |
|
|
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 |
|
 |
RogerLacroix |
Posted: Sun Sep 09, 2001 3:17 pm Post subject: |
|
|
 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 |
|
 |
chanduy9 |
Posted: Mon Jan 28, 2002 5:06 pm Post subject: |
|
|
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 |
|
 |
andystone |
Posted: Wed Jul 24, 2002 5:33 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|