[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Configuration JNDI

jaikiran do-not-reply at jboss.com
Thu Jan 24 11:03:56 EST 2008

"benjiii" wrote : 
  | (;-) you remember - I'm just a rookie trying to get some knowledge, but haven't yet...)

Ok, so here's how the ejb-local-ref/ejb-ref work. 

When you specify the ejb-ref-name then the bean will be bound with the name that you specified in the ejb-ref-name in the JNDI tree in the java:comp/env namespace. So in your case, you specifed the ejb-ref-name as ejb/DataAccessFacade. So the bean will be bound to java:comp/env/ejb/DataAccessFacade. Hence the lookup string in your servlet should be:

  | DataAccessFacadeLocalHome dataFacadeHome = (DataAccessFacadeLocalHome)getContext().lookup("java:comp/env/ejb/DataAccessFacade");	

And finally, the best way to debug NameNotFoundException is to look at the JNDI tree:

- Go to http://< server>:< port>/jmx-console (Ex: http://localhost:8080/jmx-console)
- Search for service=JNDIView on the jmx-console page
- Click on that link
- On the page that comes up click on the Invoke button beside the list() method
- The page that comes up will show the contents of the JNDI tree. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123088#4123088

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123088

More information about the jboss-user mailing list