Author |
Message
|
sfari |
Posted: Wed Jul 14, 2004 3:46 am Post subject: Passing a UserID-Header between JMS and NON_JMS |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Is it somehow possible to manipulate the value in the MQMD header UserId when using JMS.
The IBM JMS provider sets always mqm there, what is the Idea behind that?
In our environment its a requirement that each message contains the identity ot the producer for auditing reasons. Most of our clients are JMS but we also have z/OS clients.
Is there an other way to pass such an identity outside the application data between a JMS and non JMS client? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jul 14, 2004 8:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
sfari |
Posted: Thu Jul 15, 2004 7:24 am Post subject: |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
I already had a close look in that manual. As described there JMS provider sets the userId itself and ignores the JMSXUserId if it has been set by sender program?
The provider does always set the userId to mqm. To me the reason for that is not clear.
I am wondering if there is any workaroud to be able to set the userId into the message although I am using JMS? |
|
Back to top |
|
 |
vennela |
Posted: Thu Jul 15, 2004 8:08 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Try this:
QueueConnection connection = factory.createQueueConnection("ADMIN", "password");
I think, that will set the MQMD's userid to ADMIN |
|
Back to top |
|
 |
sfari |
Posted: Sun Jul 18, 2004 10:43 pm Post subject: |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Thanks for your answer!
What if you have multiple personal users using the same connection, like for example in a servlet? We have such a situation and want to have the userId set in the MQMD header for auditing reasons.
With MQ base classes this would be done:
Code: |
MQMessage.userId = "someID" |
Is there an equivalent possibility using JMS? |
|
Back to top |
|
 |
|