When I refer this EJB from a servlet and try to call this unimplemented method, it gives some exception as:
Invocation cannot proceed (end of interceptor chain has been hit)
Please post the entire exception stacktrace and the relevant code from the Servlet. Also, which server are you using?
Prajakta Acharya wrote:
My question is, why is this allowed at first place? Why doesnt compiler complain?
The Java compiler knows nothing about EJBs other than the fact that @Remote is a annotation supported by the Java language. Unless there's a specific "implements" keyword, the compiler does no checks on the implemented methods in the class. It's the EJB container which uses the @Remote information to create the relevant proxies. That's the whole reason why you need a container/server to run the EJBs.