Author |
Message
|
fsapienza |
Posted: Wed Nov 23, 2005 7:18 am Post subject: JMSXAppId and JMSXUserID properties |
|
|
Novice
Joined: 11 Nov 2005 Posts: 10
|
Hi all!
Is it possible to set JMSXAppId and IMSXUserID properties for a JMS message? (I have to use only Sun libraries, so only javax.jms package)
I tried to use something like:
message.setStringProperty ("JMSXUserID", "myUser") but threw me an exception
and
System.setProperty("user.name", "myUser") but nothing happened
Thanks
Francesco |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 23, 2005 7:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you are using the WebSphere MQ JMS Provider, regardless of whether you are using it's API or not, you can't set this. It is reset by the send method. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 23, 2005 11:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
However if you are using a JMS target you should lookup the Using Java manual and see which properties you are supposed to populate.
In any case you can create your own as long as the target is JMS or passes the RFH header through.
If all you need to set is the userID you should look at the alternate connection methods of the qcf.
In a J2EE environment this is usually taken care of through JAAS.
Enjoy  |
|
Back to top |
|
 |
fsapienza |
Posted: Thu Nov 24, 2005 2:05 am Post subject: |
|
|
Novice
Joined: 11 Nov 2005 Posts: 10
|
Thanks for your replies!
About your suggests, I can't use althernate methods of the qcf like JAAS, also because I don't need authentication, but only to set a different "JMSXUserId" (not always "root") and a correct "JMSXAppId". Moreover, I'm using MQ target, not JMS target.
I have a middleware application who sends JMS messages to host, target client is MQ, CCSID is 923, transport type is bindings.
Host _needs_ "JMSXUserId" and "JMSXAppId" in order to give me a correct answer, so I can't let method "send()" to reset them anytime.
Thanks again for your attention |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 25, 2005 5:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You can use JAAS and container managed authentication...
However I would suggest that it is very poor security to let root run your WAS.
Usually I have the user that runs WAS in the user field and I make sure it has the right permissions on the qmgr. User root is not even part of the mqm group in my setup.
Enjoy  |
|
Back to top |
|
 |
mcrobbj |
Posted: Fri Oct 01, 2010 2:43 am Post subject: JMSXUserId |
|
|
Newbie
Joined: 01 Oct 2010 Posts: 1
|
Did anyone find a means to set this perhaps using the base java mq classes |
|
Back to top |
|
 |
|