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 » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Logon using JNDI_Locator

Post new topic  Reply to topic
 Logon using JNDI_Locator « View previous topic :: View next topic » 
Author Message
mqwhelp
PostPosted: Thu May 16, 2002 8:00 am    Post subject: Logon using JNDI_Locator Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 85
Location: TCS

Hi All,

I have read one example given in programming guide on JNDI_Locator policy.


**********************

public static void main ( String[] args )
{
...
Agent agent= new Agent();
Properties prop = System.getProperties();
prop.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtx.Factory") ;
prop.put( javax.naming.Context.PROVIDER_URL,
"iiop://<Hostname of JNDI Name Server>:<JNDI Name Server Ports"" );
agent.setContext( args, prop );
agent.setLocator( Agent.JNDI_LOCATOR );
agent.setName( "<AgentName>");
...
}

******************************

In this example I could not understand what I need to pass as "args"
which is used in "agent.setContext(args,prop);"

In my program ,I had set this value as

String args[] = {"iiop://172.17.40.9:900/MQWFAGENT"};
(IP address is the name of machine where MQ workflow server is running)

and it worked successfully.

My question is what I am doing above is correct .

Please clarify the doubt about agent.setContext(args,prop);

Waiting for reply
Back to top
View user's profile Send private message Send e-mail
manoj
PostPosted: Thu May 16, 2002 11:11 am    Post subject: Reply with quote

Master

Joined: 30 Jan 2002
Posts: 237
Location: Virgina

Hi,

u can define
String args[] = {"<agent name>"};


in u r case String args[] = {"MQWFAGENT"};

cheers
_________________
-manoj
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mqwhelp
PostPosted: Thu May 16, 2002 11:57 am    Post subject: using JNDI_locator Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 85
Location: TCS

I am giving the name MQWFAGENT in the following command

agent.setName( "<AgentName>");

My question is why I need to give String args[] = {"MQWFAGENT"};
as I had mentioned the name using setName.

Could you please let me know what does
agent.setContext(args,prop); mean ???

Waiting for reply
Back to top
View user's profile Send private message Send e-mail
manoj
PostPosted: Thu May 16, 2002 12:14 pm    Post subject: Reply with quote

Master

Joined: 30 Jan 2002
Posts: 237
Location: Virgina

Hi,
It's saying that this is the agent which is published in the particular context. I think if u pass null for args still it should work because u r explicitly setting the name of the agent using setName() method.

Are u able to established the connection ?
_________________
-manoj
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mqwhelp
PostPosted: Thu May 16, 2002 1:25 pm    Post subject: Reply with quote

Voyager

Joined: 20 Dec 2001
Posts: 85
Location: TCS

Thanxs for the reply

Yes , Its working for me though I am not using

agent.setContext(args,prop);
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Logon using JNDI_Locator
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.