Author |
Message
|
rraam75 |
Posted: Mon Jan 08, 2007 6:51 am Post subject: how to set userid in JMS message |
|
|
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 |
|
 |
jefflowrey |
Posted: Mon Jan 08, 2007 6:55 am Post subject: |
|
|
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 |
|
 |
rraam75 |
Posted: Mon Jan 08, 2007 7:34 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Mon Jan 08, 2007 7:10 pm Post subject: |
|
|
 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 |
|
 |
RogerLacroix |
Posted: Tue Jan 09, 2007 9:56 am Post subject: |
|
|
 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 |
|
 |
rraam75 |
Posted: Tue Jan 09, 2007 10:26 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Jan 09, 2007 10:29 am Post subject: |
|
|
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 |
|
 |
|