-
1. Re: ClassCastException when updating ear-jar.xml schema to b
logankiefer Jun 24, 2006 10:28 PM (in response to logankiefer)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
(context.lookup(sJNDIName),narrowTo);
The same sJNDIName is used in both cases. The only thing that changes is the xsd. -
2. Re: ClassCastException when updating ear-jar.xml schema to b
bill.burke Jun 25, 2006 8:49 AM (in response to logankiefer)home interfaces are registered in JNDI under:
BeanClassName/remoteHome
BeanClassName/localHome -
3. Re: ClassCastException when updating ear-jar.xml schema to b
logankiefer Jun 26, 2006 7:37 PM (in response to logankiefer)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. -
4. Re: ClassCastException when updating ear-jar.xml schema to b
logankiefer Jun 26, 2006 9:23 PM (in response to logankiefer)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.