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 » JMSXAppId and JMSXUserID properties

Post new topic  Reply to topic
 JMSXAppId and JMSXUserID properties « View previous topic :: View next topic » 
Author Message
fsapienza
PostPosted: Wed Nov 23, 2005 7:18 am    Post subject: JMSXAppId and JMSXUserID properties Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 23, 2005 7:20 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 23, 2005 11:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
fsapienza
PostPosted: Thu Nov 24, 2005 2:05 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 25, 2005 5:43 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mcrobbj
PostPosted: Fri Oct 01, 2010 2:43 am    Post subject: JMSXUserId Reply with quote

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
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 » JMSXAppId and JMSXUserID properties
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.