I am trying to call a local session bean but I keep getting the javax.Naming.NotFound exception error. I created a local session bean called AdviceLocal bean and created the two interfaces as shown in chapter 3. I am trying to call the local bean from the remote bean AdviceBean. But when I do the commands: Context ic = new InitialContext(); Object o = ic.lookup("AdvisorLocal");
I get the exception. How can I call the local bean?
AdviceBean (remote bean) should have ejb-ref section for local bean and then refer to the local bean in remote bean like Context ic = new InitialContext(); Object o = ic.lookup("java:comp/env/AdvisorLocal");
I don't have work experience, this is depending on the material I read so far. Please correct me if it is wrong.