I am trying to lookup an EJB from a servlet in Tomcat using the name java:comp/env/ejb/EJBName.
However, the issue is I get a NamingException for "comp not bound". I checked the JNDIView MBean and my EJBs do bound properly within the comp space.
I added the necessary ejb-local-ref to my web.xml and my EAR works fine with Jetty. It's only when I'm using Tomcat that I get this issue.
What is the main difference between the Jetty bundle and the Tomcat bundle for the JBoss 3.2.1 release that these differences would exist? Don't they both run as embedded servlet containers?
The code that does the actual lookup looks like:
InitialContext initialContext = new InitialContext();
localHome = (mts.psp.ui.SiteManagerLocalHome) initialContext.lookup("java:comp/env/ejb/SiteManagerLocal");
My web.xml (which works fine for Jetty) has the following ejb-local-ref:
Is there some difference between Jetty and Tomcat which I'm totally missing? Any help would be greatly appreciated.