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 » JNDI_LOCATOR problem

Post new topic  Reply to topic
 JNDI_LOCATOR problem « View previous topic :: View next topic » 
Author Message
kwcwong
PostPosted: Tue Feb 18, 2003 11:05 pm    Post subject: JNDI_LOCATOR problem Reply with quote

Newbie

Joined: 18 Feb 2003
Posts: 3

Hi,

I have a MQWF server and WAS AE 4.0 server running on the same development machine. I have tried to run a sample code to use JNDI_LOCATOR to connect to the MQWF sever, but it failed. I cannot figure out what's going wrong. Can anyone help?

I have started WAS AE and the MQWF COBRA agent before running my sample code. My workflow CORBA agent starts succesfully:
***********************************************
FMC38004I MQSeries Workflow CORBA Agent started.
------------------------------------------------
Name : iiop://KAWAH:900/WFSAMPLE
Locator : JNDI_LOCATOR
Transport : RMI-IIOP
Reaper Cycle : 300 seconds
Reaper Threshold : 1000 objects
Reaper Ratio : 90 %
************************************************

Here is my sample code. I have run it on WASD 4.0
************************************************
import com.ibm.workflow.api.*;
import com.ibm.workflow.api.ServicePackage.*;
import java.util.*;

public class JNDILogin {

public static void main(String[] args) {
try {
ExecutionService service;


Agent agent = new Agent();
Properties prop = new Properties();
prop.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory" );
prop.put( javax.naming.Context.PROVIDER_URL, "iiop://KAWAH:900" );
agent.setContext(args, prop);
agent.setLocator(Agent.JNDI_LOCATOR);
agent.setName("WFSAMPLE");

System.out.println("locate service");
service = agent.locate("FMCGRP", "FMCSYS");

service.logon2("ADMIN", "password", SessionMode.PRESENT_HERE,
AbsenceIndicator.LEAVE);
System.out.println("successful logon");

service.logoff();
System.out.println("successful logoff");

} catch (FmcException e) {
System.out.println("Error: \n" + e);
} catch (java.beans.PropertyVetoException e) {
System.out.println("Error: \n" + e);
}
}
}
************************************************

When I execute the sample code, following error returns:

Error:
java.beans.PropertyVetoException: FMC38000E Could not locate Agent for Domain WFSAMPLE


Any help is appreciated.

Thanks and regds,
Chris
Back to top
View user's profile Send private message
jet
PostPosted: Fri Feb 21, 2003 8:56 am    Post subject: Reply with quote

Apprentice

Joined: 04 Dec 2002
Posts: 49
Location: New York

Did you add Java Agent and Java API jar files to your class path?

BTW, why not use local binding in your setting?
Back to top
View user's profile Send private message
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 » JNDI_LOCATOR problem
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.