hello I use ejb in order to modelise other ejb. so i create an instance of an ejb in an other ejb wich is not in the same application. when the method narow is thrown i catch a Cast exception. if i put manually a reference i have no exception but i lost the dynamicity? did you have the same problem? what is the solution? (excuse me for my bad english)
Originally posted by marc de toutophone: when the method narow is thrown i catch a Cast exception. if i put manually a reference i have no exception but i lost the dynamicity?
I think what you're saying is that you need to use the EJB's interface in order to narrow the remote stub, but then you are hard-coding the EJB. Is this correct? If so, you could pass in the EJB's interface's class as a parameter or make it a configuration item for use with Class.forName().
yes i uses forName() to modelise the class of the remote interface but the ejb is deployed on an other application server and so i use an other context where i do the lookup. the lookup return the well class , forname also but narrow can't cast the 2 class. if i deploy on the same application server and so i have the same context, narrow dont send an exception
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
a bit of art, as a gift, the permaculture playing cards