public class vkdms1 implements SessionBean {
public String getMessage() throws EJBException {
// rename and start putting your business logic here
System.out.println("in the message");
String s="hai";
return s;
}
#################################
public class vkdms2 implements SessionBean {
public void ejbCreate() throws CreateException {
// TODO Add ejbCreate method implementation
try{
Properties p=System.getProperties();
Hashtable ht=new Hashtable(p);
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
javax.naming.InitialContext ic=new javax.naming.InitialContext(ht);
Object o=ic.lookup("ejb/vkdms1Local");
System.out.println("after the object");
vkdms1LocalHome h=(vkdms1LocalHome)javax.rmi.PortableRemoteObject.narrow(o, vkdms1LocalHome.class);
//vkdms1LocalHome h=(vkdms1LocalHome)o;
vkdms1Local r=h.create();
System.out.println("after the create method"+r.getMessage());
}catch(Exception e){e.printStackTrace();}
###################################
i am calling second jndi in client and i got this error
/////////////javax.naming.NameNotFoundException: While trying to lookup 'ejb.vkdms2Local' didn't find subcontext 'ejb' Resolved [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'ejb.vkdms2Local' didn't find subcontext 'ejb' Resolved ]; remaining name 'ejb/vkdms2Local'////////