Please i need help regarding this. I am using wsad5.0 and when i am doing lookup for my cmp2.0 entity beans(i am using local interfaces). When i do a lookup from my stateless session beans i could not find my entity beans. I am getting name not found exception. My jndi name is ejb/casedb/ejb/Customer29LocalHome ( as found in the beans tab of the deployment descriptor for Customer29 entity bean) what should be my lookup string in the statelesssession bean(even this is one also uses local interface) Thanks in advance Chandoo :!
It really depends on the EJB container that you are using. If this is wsad5.0, forgive me -- I'm not familiar with it. However, how JNDI names are set is deployment-specific (different for each app server). You will want to look inside whatever server you are using to ensure that the JNDI names are actually registered with it. At that point, if you have some jndi name of "ejb/localthing", then you will typically look it up using "jndi:comp/env/ejb/localthing". Geez, I hope that's right. (Trying to do this from memory.) Since you're dealing with the local component interface, you'll need to just get the context from the InitialContext() and do the lookup from there. You should be fine though. Your first step, and most like the problem, is making sure the JNDI name is bound correctly in your application server.