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 » how to set userid in java application using MQ API

Post new topic  Reply to topic
 how to set userid in java application using MQ API « View previous topic :: View next topic » 
Author Message
srinivas Raju
PostPosted: Tue Jun 26, 2007 1:48 am    Post subject: how to set userid in java application using MQ API Reply with quote

Novice

Joined: 20 Feb 2007
Posts: 22
Location: India

Hai.

please do it for me. i wants to set my system login id as MQMD userid in java application.

can any one give syntax to set userid.


thanks
raju
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
marcin.kasinski
PostPosted: Tue Jun 26, 2007 1:59 am    Post subject: Re: how to set userid in java application using MQ API Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

To set userid you can use code :

Code:
Systen.setProperty("user.name","newusername");


Why do you want to do it ?
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Jun 26, 2007 2:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Why not use QCF as was suggested to you here:

http://www.mqseries.net/phpBB2/viewtopic.php?p=183179&highlight=#183179
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
srinivas Raju
PostPosted: Tue Jun 26, 2007 2:14 am    Post subject: Reply with quote

Novice

Joined: 20 Feb 2007
Posts: 22
Location: India

ya marcin

i have Qmgr running in AIX server. and java application running in client machine. this application is putting messages in that.

for secrity reasons i have used security exits in server, which will verify both IP and user name of client.

after runnigng java client the exit log is as follows


2007-06-25|12:42:43|Connection refused, Channel [SYSTEM.ADMIN.SVRCONN] ConName [10.1.54.136] User [] not in positive list [sreenu,mqm,root,]


2007-06-25|12:42:43|Channel closed [SYSTEM.ADMIN.SVRCONN] Connection Name [10.1.54.136]

so here may be application is not representing user name of machine.

thats why i need this

if u get any idea please let me know

thanks
raju
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
srinivas Raju
PostPosted: Tue Jun 26, 2007 2:17 am    Post subject: Reply with quote

Novice

Joined: 20 Feb 2007
Posts: 22
Location: India

Vitor wrote:
Why not use QCF as was suggested to you here:

http://www.mqseries.net/phpBB2/viewtopic.php?p=183179&highlight=#183179



i have tried this. but giving error. may be wrong syntax.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Vitor
PostPosted: Tue Jun 26, 2007 2:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

srinivas Raju wrote:
Vitor wrote:
Why not use QCF as was suggested to you here:

http://www.mqseries.net/phpBB2/viewtopic.php?p=183179&highlight=#183179



i have tried this. but giving error. may be wrong syntax.


It's still the better way. Perhaps you should try and resolve the problem before abandoning the method? Maybe try something radicial, like posting the error here along with your syntax?


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Jun 26, 2007 2:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

That magical thing called the manual says this (before the connect):

Quote:
The user ID and password default to blanks. To specify a non-blank user ID or password, use the code:

MQEnvironment.userID = "uid"; // equivalent to env var MQ_USER_ID

MQEnvironment.password = "pwd"; // equivalent to env var MQ_PASSWORD
Back to top
View user's profile Send private message
srinivas Raju
PostPosted: Tue Jun 26, 2007 2:44 am    Post subject: Reply with quote

Novice

Joined: 20 Feb 2007
Posts: 22
Location: India

zpat wrote:
That magical thing called the manual says this (before the connect):

Quote:
The user ID and password default to blanks. To specify a non-blank user ID or password, use the code:

MQEnvironment.userID = "uid"; // equivalent to env var MQ_USER_ID

MQEnvironment.password = "pwd"; // equivalent to env var MQ_PASSWORD



it's working with above code. thank you
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Vitor
PostPosted: Tue Jun 26, 2007 2:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

srinivas Raju wrote:
zpat wrote:
That magical thing called the manual says this (before the connect):

Quote:
The user ID and password default to blanks. To specify a non-blank user ID or password, use the code:

MQEnvironment.userID = "uid"; // equivalent to env var MQ_USER_ID

MQEnvironment.password = "pwd"; // equivalent to env var MQ_PASSWORD



it's working with above code. thank you


Aren't manuals just so clever?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
srinivas Raju
PostPosted: Tue Jun 26, 2007 8:56 pm    Post subject: Reply with quote

Novice

Joined: 20 Feb 2007
Posts: 22
Location: India

Vitor wrote:
srinivas Raju wrote:
zpat wrote:
That magical thing called the manual says this (before the connect):

Quote:
The user ID and password default to blanks. To specify a non-blank user ID or password, use the code:

MQEnvironment.userID = "uid"; // equivalent to env var MQ_USER_ID

MQEnvironment.password = "pwd"; // equivalent to env var MQ_PASSWORD



it's working with above code. thank you


Aren't manuals just so clever?


obviously manuals so clever.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » how to set userid in java application using MQ API
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.