|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
User ID at new PCFMessageAgent()? |
« View previous topic :: View next topic » |
Author |
Message
|
Suessli |
Posted: Tue Feb 24, 2009 1:09 am Post subject: User ID at new PCFMessageAgent()? |
|
|
Novice
Joined: 29 Jan 2008 Posts: 15
|
Hi everyone,
maybe I am blind or maybe my knowledge about mq ist still at very low level but I am not able to connect to a queue manager via PCF command from the Java API.
I am trying to connect as follows.
Code: |
...
System.out.print ("Connecting to queue manager at " + host + ":" + port + " over channel " + channel + "... ");
agent = new PCFMessageAgent (host, Integer.parseInt (port), channel);
System.out.println ("Connected.");
...
|
I am getting MQRC 2009 and it is ok because BlockIP2 is blocking the connection because no user is send. And now the big question: How do I send user id to the queue manager via PCF? I am not able to find any examples in this forum or on the internet :-/
EDIT: I am using MO71 while logged in with same user name and connections via same channel and with BlockIP2 are possible. But why there is no user send when I am executing my Java code in eclipse? BlockIP2 log says that no user is sent and it is blocking the connection.
EDIT: Doh!
Code: |
MQEnvironment.userID = "user";
|
Now the question is: if I want to run this under user that executes my application, how it is done then? _________________ Suessli |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 24, 2009 5:03 am Post subject: Re: User ID at new PCFMessageAgent()? |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Suessli wrote: |
Now the question is: if I want to run this under user that executes my application, how it is done then? |
You have to figure out how to write Java code that will ask the OS what user is running the current process.
The JVM will not do this for you, nor will the MQ libraries unless you are making a Bindings connection. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Feb 25, 2009 1:26 pm Post subject: Re: User ID at new PCFMessageAgent()? |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|