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 » setting JMSXUserId to a userId that is not present on Server

Post new topic  Reply to topic
 setting JMSXUserId to a userId that is not present on Server « View previous topic :: View next topic » 
Author Message
srinivasakj
PostPosted: Wed Jun 21, 2006 3:45 am    Post subject: setting JMSXUserId to a userId that is not present on Server Reply with quote

Newbie

Joined: 19 Jan 2006
Posts: 6

We have a issue with our JMS Application, which is trying to set the JMSxUserID property in the message and is failing. We saw the IBM site got to know that, we cannot set this field, since it is read-only. We used MQEnvironment.userid = "test" to set the userid. But here the problem is the userID that we set is not present in the server and hence it will throw the exception. When i code the above statement after connecting to Qmgr it is not setting the userid.

Please let me know if you any ideas about this.

Thanks
Srinivasa KJ
Back to top
View user's profile Send private message
saketr
PostPosted: Wed Jun 21, 2006 4:40 am    Post subject: Reply with quote

Apprentice

Joined: 08 Feb 2006
Posts: 41

Sorry, what is the problem?
Back to top
View user's profile Send private message
srinivasakj
PostPosted: Wed Jun 21, 2006 4:46 am    Post subject: RE:setting JMSXUserId to a userId that is not present on Ser Reply with quote

Newbie

Joined: 19 Jan 2006
Posts: 6

the problem is WRT setting of userID(that is not present in the server) from a JMS Client Application.
Back to top
View user's profile Send private message
saketr
PostPosted: Wed Jun 21, 2006 5:04 am    Post subject: Reply with quote

Apprentice

Joined: 08 Feb 2006
Posts: 41

Maybe a solution to your problem could be to use user properties, something like myMessage.setStringProperty("UserId", id)? The consumer application can inquire this property and extract the value.

In other words, why must you place a uid value in this header field, _and_ why must this uid be invalid (from a MQ qm perspective)?

Regards,
Saket
Back to top
View user's profile Send private message
srinivasakj
PostPosted: Wed Jun 21, 2006 5:23 am    Post subject: RE:setting JMSXUserId to a userId that is not present on Ser Reply with quote

Newbie

Joined: 19 Jan 2006
Posts: 6

the requirement from the client is such that the userId that we set from the JMS Client app will neither be present on the Client nor on the Server where Qmgr exists.

myMessage.setStringProperty("UserId", id) is unable to set the userId that I specify. when I browse the message the UserId field still shows the userId that I had used for Queue Connection.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 21, 2006 7:15 pm    Post subject: Reply with quote

Grand High Poobah

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

The only way to set the userId in java/JMS is to use:
Connection mycon = qcf.createConnection(userid, passwd) .

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
srinivasakj
PostPosted: Wed Jun 21, 2006 8:23 pm    Post subject: RE:setting JMSXUserId to a userId that is not present on Ser Reply with quote

Newbie

Joined: 19 Jan 2006
Posts: 6

Code:
Connection mycon = qcf.createConnection(userid, passwd) . 

The Problem with setting userid in this way is, we do not have this userid on the Server M/C.

One possible solution that I'm thinking of right now is the Send Exit. If anybody has any ideas on how to do this. Please comment.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 22, 2006 10:15 am    Post subject: Reply with quote

Grand High Poobah

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

You need to define a security check that is different from the usual (ldap or custom) or expand the OS security check for your purpose...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Fri Jun 23, 2006 10:40 am    Post subject: Re: setting JMSXUserId to a userId that is not present on Se Reply with quote

Jedi Knight

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

srinivasakj wrote:
We have a issue with our JMS Application, which is trying to set the JMSxUserID property in the message and is failing. We saw the IBM site got to know that, we cannot set this field, since it is read-only. We used MQEnvironment.userid = "test" to set the userid. But here the problem is the userID that we set is not present in the server and hence it will throw the exception. When i code the above statement after connecting to Qmgr it is not setting the userid.

Hi,

I had a similar request at a client site. I solved it by using the Alternater UserId feature. But I wrote the code in Java using the MQ base Java API and not JMS. Lookup in the WMQ Using Java manual and see if altUserId is available to JMS.

Therefore, only 1 UserId needs to be defined to the server that contains the queue manager that you connect to (i.e. 'ABC'). Then after your application sucessfully connects to the queue manager, it uses any other UserId that you want. (i.e. U1, U2, U3, etc..).

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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » setting JMSXUserId to a userId that is not present on Server
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.