|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
mqmessage.UserId different after queue.put(mqmessage); |
« View previous topic :: View next topic » |
Author |
Message
|
wmanbik |
Posted: Mon Jul 16, 2007 8:19 am Post subject: mqmessage.UserId different after queue.put(mqmessage); |
|
|
Newbie
Joined: 16 Jul 2007 Posts: 2
|
Hi
In my java code I try to send a mq message with a set userId to a remote queue.
I'm setting the userId like this:
mqMessage.userId = "WMANBIK";
But when I am sending the message to the remote queue, the userId are changed to "MUSR_MQADMIN"
my send method are either
queue.put(mqMessage, putOptions);
or
queue.put(mqMessage);
that is just the same.
The owner of the remote queue, are rejecting my messages, because they say I using a wrong userid.
Could it have something to do with the way I'm openning the connection to the queue.
openOptions = MQC.MQOO_OUTPUT | MQC.MQPMO_NONE;
queue = queueManager.accessQueue
(
queueName
, openOptions
, null
, null
, null
);
Hope someone can help.
Regards,
Anders |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 16, 2007 10:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Where are they seeing the user id? In the MQMD?
You may need to set pass context. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 16, 2007 11:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The userId field doesn't work like that, at least the one on mqMessage.
That's the "alternate user".
Specify the userid in the connection.
Or use a bindings connection - which will force the id to be the userid running your Java program. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wmanbik |
Posted: Tue Jul 17, 2007 12:00 am Post subject: |
|
|
Newbie
Joined: 16 Jul 2007 Posts: 2
|
Hi
Thanks for the replies
Yes I trying to set the userId on the MQMD header.
I think its the correct userId that the owner of the remote queue, want my to set. They can see that my message have userId "MUSR_MQADMIN", which is also the value I get in a
System.out.println(mqMessage.userId)
after i have done the
queue.put (mqMessage);
Regards
Anders |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 17, 2007 3:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Becuase you haven't set the userid on the connection. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|