Some more testing shows that the exact same lookup will return an object that implements a Home interface when using ejb-jar_2_0.xsd and it will return a an object that implements the Remote interface when using the ejb-jar_3_0.xsd
Lookup Code below:
EJBHome home = (EJBHome)PortableRemoteObject.narrow
The same sJNDIName is used in both cases. The only thing that changes is the xsd.
home interfaces are registered in JNDI under:
Does this mean instead of passing in a JNDI name of ejb/LoginController to the context lookup I should use LoginControllerBean/remoteHome?
LoginController EJB names for reference in this example:
Home Interface = LoginControllerHome
Remote Interface = LoginController
Bean = LoginControllerBean.
I read in the Enterprise EJB 3 book that the default JNDI binding ofr a remote interface is obtained by concatenating the ejb name with /remote So, for my example above it would be 'LoginControllerBean/remote'. However, I recieve the same ClassCastException.
I'm not sure what other information I could provide that would help gleam some light on this problem.