Hi,
Now I have a problem running the client.The client stops running with an exception NameNotFoundException.
While genrating deployment descriptor using the jetace tool I have specified the JNDI name and using the same in my client programme too.And I delpoy it successfully using the admin console.
I don't exactly why i getting this problem..have i missed out something while installing or should I take care of something else which I haven't done.Please help me out.
My client code goes this way...
import com.gdii.helloworld.* ;
import java.util.*;
import java.rmi.*;
import javax.naming.*;
import javax.ejb.*;
import javax.rmi.PortableRemoteObject;
public class HelloClient{
public static void main(
String [] args) {
try {
// Properties props = System.getProperties() ;
// Context ctx = new InitialContext(props) ;
System.out.println("1");
Properties properties = new Properties();
System.out.println("2");
properties.put(javax.naming.Context.PROVIDER_URL,"iiop://192.168.3.134");
properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.ibm.ejs.ns.jndi.CNInitialContextFactory");
System.out.println("3");
System.out.println(properties.get(javax.naming.Context.PROVIDER_URL));
System.out.println(properties.get(javax.naming.Context.INITIAL_CONTEXT_FACTORY));
InitialContext initial= new InitialContext(properties);
System.out.println("4");
Object homeObject=initial.lookup("rita");
System.out.println("5");
HelloHome home =(HelloHome) PortableRemoteObject.narrow(homeObject,HelloHome.class);
System.out.println("6");
//Context ctx = new InitialContext() ;
//HelloHome home = (HelloHome) ctx.lookup("HelloHome") ;
Hello hello = home.create() ;
System.out.println(hello.hello()) ;
hello.remove() ;
}catch(Exception excp) {
excp.printStackTrace() ;
}
}
}
Prashanth