| Author | 
		  Message
		 | 
		
		  | srinivas Raju | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 1:48 am    Post subject: how to set userid in java application using MQ API | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | marcin.kasinski | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 1:59 am    Post subject: Re: how to set userid in java application using MQ API | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | srinivas Raju | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:14 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | srinivas Raju | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Feb 2007 Posts: 22 Location: India 
  | 
		  
		    
			  
				
 
 
 
i have tried this. but giving error. may be wrong syntax. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| srinivas Raju wrote: | 
   
  
	
 
 
 
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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | srinivas Raju | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 2:55 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | srinivas Raju | 
		  
		    
			  
				 Posted: Tue Jun 26, 2007 8:56 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |