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 » mqmessage.UserId different after queue.put(mqmessage);

Post new topic  Reply to topic
 mqmessage.UserId different after queue.put(mqmessage); « View previous topic :: View next topic » 
Author Message
wmanbik
PostPosted: Mon Jul 16, 2007 8:19 am    Post subject: mqmessage.UserId different after queue.put(mqmessage); Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 16, 2007 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 16, 2007 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message
wmanbik
PostPosted: Tue Jul 17, 2007 12:00 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 17, 2007 3:58 am    Post subject: Reply with quote

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
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 » mqmessage.UserId different after queue.put(mqmessage);
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.