I am relatively new to EJB (my second week now in fact). I hope my problem will be easy for most of you and am grateful for your help.
I am deploying a number of EJBs onto OC4J using Oracle 9i JDeveloper. I have no problem looking up the EJBs from a client computer with the code like:
Properties props = new Properties();
// Get the JNDI initial context
InitialContext ctx = new InitialContext(props);
// Get a reference to the Home Object which we use to create the EJB Object
Object objJNDI = ctx.lookup("comp/env/ejb/Inventory");
// Now cast it to an InventoryHome object
InventoryHome objInventoryHome = (InventoryHome)PortableRemoteObject.narrow(objJNDI,InventoryHome.class);
/* System.out.println("Getting NodeHome...");
NodeHome home = (NodeHome)PortableRemoteObject.narrow(ctx.lookup("comp/env/ejb/Node"),NodeHome.class);
However, when I am trying to do the same look up from one of the deployed EJBs (to get access to another EJB on the same server in the same application) it comes back with the javax.naming.NameNotFoundException exception.
Guys, could you point me at what I am doing wrong?
I also tried to specify no context environment but that did not work either.
Thanks in advance for your help!