This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
My application structure is as follows:
1) I have a JAR file containing EJB interfaces. Lets call it EJBClient.jar.
It is placed in WEB-INF/lib directory of a web application.
2) I have another JAR of actual EJBs implementing above interfaces. This JAR is pacakged as an EAR and deployed on JBoss.
EAR name is echoejb.ear
3) JBoss prints JNDI names of registered EJBs on console.
4) Now, in servlet, I am using @EJB(lookup="lookup-string"), but I am getting following exception:
Can not set ejb.EchoBeanRemoteInterface field org.cts.servlet.WebServlet.remoteEcho1 to ejb.EchoBeanRemoteInterface$$$view6
What does this mean?
I tried looking up using InitialContext but same result
For look-up, I am using global namespace.
5) If EJB implementation jar is placed in the same web application, look-up is successful.