I define a findAll() method in home interface which return a collection and implemt ejbFindAll() method which put keys into a Vector.While I iterate the objects in EJB client,the object can't cast to remote interface type.
The exception is:ClassCastException
I use JBuilder5.0 as IDE and BAS4.5 as application server.I don't know why and hope some one could direct me.Thanks in advance
Sorry,I have found the cause,it's JBuilder's misdirection.We should use PortableRemoteObject.narrow rather than simple type casting.
Do not impement that finder method in the bean,these methods are taken care care by the container.
Regarding the code in the Client Application,do check UR code properly.
First of all finder methods returns a Remote interface or
So first Enumerate N then iterate .