Originally posted by mcd:
It's hard to tell, with no code posted. Remember that in EJB 1.1 you have to specify the remote referenced in the deployment descriptor with the "ejb-ref" tag.
mcd
Well i am pating the code which i have used both in servlet ( which works) and the S'less session bean.
String JNDI_NAME="TestAcc";
javax.naming.Context initial=null;
java.util.Hashtable env =new java.util.Hashtable(1);
try{
initial = new javax.naming.InitialContext(env);
}
catch(Exception e) {
System.out.println("could not get initContext");
}
try{
Object objref = null;
objref = initial.lookup(JNDI_NAME);
//objref = initial.lookup("TestAcc"); // tried this also
TestAccHome home = (TestAccHome)PortableRemoteObject.narrow(objref, TestAccHome.class);
TestAcc duke = home.create("1", "Duke", "Earl", 50.00);
}
catch(javax.naming.NamingException e)
{
System.out.println("Lookup exception ");
}
catch(Exception e)
{
System.out.println("Lookup exception " + e);
}
I get "Lookup exception "
I guess this should be helpful to you.
regards
jani prashant