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 » how to set userid in JMS message

Post new topic  Reply to topic
 how to set userid in JMS message « View previous topic :: View next topic » 
Author Message
rraam75
PostPosted: Mon Jan 08, 2007 6:51 am    Post subject: how to set userid in JMS message Reply with quote

Novice

Joined: 18 Mar 2006
Posts: 14

Hello,
I want to set userid in every message. I use JMS to send messages to websphere mq.
I tried to set the value as
message.setStringProperty("JMSXUserID", "ABCIM2A");

But the application throws an message format exception. I searched in couple of forums and the result is, there is no way to set an user-id via JMS. Is it that correct?? Also, is it the "JMSX..." is the reserved property which the application shouldnot override the values?

Any suggestion pls??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 08, 2007 6:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You set the userid by specifying it when you connect.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rraam75
PostPosted: Mon Jan 08, 2007 7:34 am    Post subject: Reply with quote

Novice

Joined: 18 Mar 2006
Posts: 14

for creating the mq connection through factory, i specify the user-id & password as below.
connection = factory.createQueueConnection(HostMQUserID,HostMQPassword);

but this userid is not valid at the message processing side. Iam sending message to mainframe. So when MQGet is issued at mainframe that application checks for valid user-id in the message.
So, i don't know how to set user-id through JMS.
I know that IBM MQAPI supports to set user-id in MQMD. Simillary how I can set the value through JMS?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 08, 2007 7:10 pm    Post subject: Reply with quote

Grand High Poobah

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

You mean to say that you want to set an ALTERNATE user id.
I believe you can only do so in MQ base.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Tue Jan 09, 2007 9:56 am    Post subject: Reply with quote

Jedi Knight

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

rraam75 wrote:
for creating the mq connection through factory, i specify the user-id & password as below.
connection = factory.createQueueConnection(HostMQUserID,HostMQPassword);

Correct.

rraam75 wrote:
but this userid is not valid at the message processing side.

As Captain Picard would say, "make it so, number one".

In other words, define the required mainframe UserId on the Unix or Windows server where the MQ server is installed and then use it.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
rraam75
PostPosted: Tue Jan 09, 2007 10:26 am    Post subject: Reply with quote

Novice

Joined: 18 Mar 2006
Posts: 14

Quote:
In other words, define the required mainframe UserId on the Unix or Windows server where the MQ server is installed and then use it.

OK that means the "HostMQUserID" that I use to get the queue connection in windows, will be set as user-id field in mainframe?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 09, 2007 10:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The user id that you use to connect will be put into the MQMD user id field.

This may or may not be preserved by your MQ network. If the channels between the queue managers have an MCAUser set or different values for PUTAUT then it might be entirely different when it gets to the zOS machine.
_________________
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 » how to set userid in JMS message
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.