Author |
Message
|
srinivasakj |
Posted: Wed Jun 21, 2006 3:45 am Post subject: setting JMSXUserId to a userId that is not present on Server |
|
|
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 |
|
 |
saketr |
Posted: Wed Jun 21, 2006 4:40 am Post subject: |
|
|
Apprentice
Joined: 08 Feb 2006 Posts: 41
|
Sorry, what is the problem? |
|
Back to top |
|
 |
srinivasakj |
Posted: Wed Jun 21, 2006 4:46 am Post subject: RE:setting JMSXUserId to a userId that is not present on Ser |
|
|
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 |
|
 |
saketr |
Posted: Wed Jun 21, 2006 5:04 am Post subject: |
|
|
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 |
|
 |
srinivasakj |
Posted: Wed Jun 21, 2006 5:23 am Post subject: RE:setting JMSXUserId to a userId that is not present on Ser |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Jun 21, 2006 7:15 pm Post subject: |
|
|
 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 |
|
 |
srinivasakj |
Posted: Wed Jun 21, 2006 8:23 pm Post subject: RE:setting JMSXUserId to a userId that is not present on Ser |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Jun 22, 2006 10:15 am Post subject: |
|
|
 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 |
|
 |
RogerLacroix |
Posted: Fri Jun 23, 2006 10:40 am Post subject: Re: setting JMSXUserId to a userId that is not present on Se |
|
|
 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 |
|
 |
|