I'm full of doubts so I'd just like to ask. If your EJB and Webapp is in the same EAR file, then is it unnecessary to make a JNDI lookup? Thanks!
posted 9 years ago
No. Even if the EJB and Web modules are part of the same EAR, you need to use JNDI lookup to get the Home interface preferably through [ejb-ref] tag in the web.xml . Also you have to use Remote interface (not local interface). Most of the application servers provide optimizations if the EJB client is part of the same application (For WebLogic refer the tag enable-call-by-reference).